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

Use shouldBe instead of ==.

This commit is contained in:
Rob Rix 2016-06-27 13:21:32 -04:00
parent 1dd10050f6
commit c70c936d60
2 changed files with 3 additions and 3 deletions

View File

@ -18,11 +18,11 @@ spec :: Spec
spec = parallel $ do
prop "equality is reflexive" $
\ a b -> let diff = diffTerms (free . Free) (==) diffCost (toTerm a) (toTerm (b :: ArbitraryTerm Text (Record '[Category]))) in
diff == diff
diff `shouldBe` diff
prop "equal terms produce identity diffs" $
\ a -> let term = toTerm (a :: ArbitraryTerm Text (Record '[Category])) in
diffCost (diffTerms (free . Free) (==) diffCost term term) == 0
diffCost (diffTerms (free . Free) (==) diffCost term term) `shouldBe` 0
describe "mergeMaybe" $ do
it "is symmetrical" $ pending

View File

@ -12,7 +12,7 @@ spec :: Spec
spec = parallel $ do
describe "Term" $ do
prop "equality is reflexive" $
\ a -> toTerm a == toTerm (a :: ArbitraryTerm Text ())
\ a -> toTerm a `shouldBe` toTerm (a :: ArbitraryTerm Text ())
describe "ArbitraryTerm" $ do
prop "generates terms of a specific size" . forAll ((arbitrary >>= \ n -> (,) n <$> termOfSize n) `suchThat` ((> 0) . fst)) $