mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Test the generation of changed entries.
This commit is contained in:
parent
06d40b69b7
commit
a8f68f61d0
@ -45,6 +45,9 @@ spec = parallel $ do
|
||||
prop "produces patched entries for relevant nodes within patches" $
|
||||
\ patch -> let patch' = (unListableF <$> patch :: Patch (Term (Syntax ()) Int)) in tableOfContentsBy (Just . headF) (pure patch') `shouldBe` Patched <$> traverse (pure . lastValue) patch'
|
||||
|
||||
prop "produces changed entries for relevant nodes containing irrelevant patches" $
|
||||
\ diff -> let diff' = fmap (1 <$) <$> mapAnnotations (const (0 :: Int)) (unListableDiff diff :: Diff (Syntax ()) Int) in tableOfContentsBy (\ (n :< _) -> if n == 0 then Just n else Nothing) diff' `shouldBe` if Prologue.null diff' then [Unchanged 0] else replicate (Prologue.length diff') (Changed 1)
|
||||
|
||||
describe "diffTOC" $ do
|
||||
it "blank if there are no methods" $
|
||||
diffTOC blankDiffBlobs blankDiff `shouldBe` [ ]
|
||||
|
Loading…
Reference in New Issue
Block a user