1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Test that tableOfContentsBy will drop everything with the constant Nothing function.

This commit is contained in:
Rob Rix 2017-05-10 17:01:42 -04:00
parent 120e76a865
commit 0bb408bf06

View File

@ -28,6 +28,9 @@ import Test.LeanCheck
spec :: Spec
spec = parallel $ do
describe "tableOfContentsBy" $ do
prop "drops all nodes with the constant Nothing function" $
\ diff -> tableOfContentsBy (const Nothing :: a -> Maybe ()) (unListableDiff diff :: Diff (Syntax ()) ()) `shouldBe` []
describe "diffTOC" $ do
it "blank if there are no methods" $
diffTOC blankDiffBlobs blankDiff `shouldBe` [ ]