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:
parent
1dd10050f6
commit
c70c936d60
@ -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
|
||||
|
@ -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)) $
|
||||
|
Loading…
Reference in New Issue
Block a user