1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00

Strip diffs in the unbiased test.

This commit is contained in:
Rob Rix 2016-08-11 12:45:40 -04:00
parent 0aef8a8467
commit 336f37d0c8

View File

@ -40,4 +40,4 @@ spec = parallel $ do
prop "produces unbiased deletions" $
\ a b -> let (a', b') = (decorate (toTerm a), decorate (toTerm (b :: ArbitraryTerm Text (Record '[Category]))))
root = cofree . ((pure 0 .: Program .: RNil) :<) . Indexed in
diffTerms wrap compare diffCost (root [ a', b' ]) (root [ a' ]) `shouldBe` reverse' (diffTerms wrap compare diffCost (root [ b', a' ]) (root [ a' ]))
stripDiff (diffTerms wrap compare diffCost (root [ a', b' ]) (root [ a' ])) `shouldBe` reverse' (stripDiff (diffTerms wrap compare diffCost (root [ b', a' ]) (root [ a' ])))