1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Test that alignBranch covers every child in the input.

This commit is contained in:
Rob Rix 2016-05-25 09:54:42 -04:00
parent c1198065e2
commit 1f0d0eb714

View File

@ -13,6 +13,7 @@ import Data.Bifunctor.Join
import Data.Foldable (toList)
import Data.Functor.Both as Both
import Data.Functor.Identity
import Data.List (nub, sort)
import Data.Maybe (catMaybes, fromMaybe)
import Data.Monoid
import Data.Text.Arbitrary ()
@ -53,7 +54,10 @@ spec = parallel $ do
pendingWith "TBD"
prop "covers every input child" $
pendingWith "TBD"
\ elements ->
let (_, ranges) = toSourcesAndRanges elements
children = toAlignedChildren elements in
sort (nub (keysOfAlignedChildren (alignBranch id children ranges))) `shouldBe` sort (catMaybes (branchElementKey <$> elements))
prop "covers every line of every input child" $
pendingWith "TBD"