mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Test that alignBranch covers every child in the input.
This commit is contained in:
parent
c1198065e2
commit
1f0d0eb714
@ -13,6 +13,7 @@ import Data.Bifunctor.Join
|
|||||||
import Data.Foldable (toList)
|
import Data.Foldable (toList)
|
||||||
import Data.Functor.Both as Both
|
import Data.Functor.Both as Both
|
||||||
import Data.Functor.Identity
|
import Data.Functor.Identity
|
||||||
|
import Data.List (nub, sort)
|
||||||
import Data.Maybe (catMaybes, fromMaybe)
|
import Data.Maybe (catMaybes, fromMaybe)
|
||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
import Data.Text.Arbitrary ()
|
import Data.Text.Arbitrary ()
|
||||||
@ -53,7 +54,10 @@ spec = parallel $ do
|
|||||||
pendingWith "TBD"
|
pendingWith "TBD"
|
||||||
|
|
||||||
prop "covers every input child" $
|
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" $
|
prop "covers every line of every input child" $
|
||||||
pendingWith "TBD"
|
pendingWith "TBD"
|
||||||
|
Loading…
Reference in New Issue
Block a user