File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 7979
8080### Values
8181
82+ (/==) :: forall a b. (Eq a, Show a) => a -> a -> Result
83+
8284 (<?>) :: Boolean -> String -> Result
8385
86+ (===) :: forall a b. (Eq a, Show a) => a -> a -> Result
87+
8488 quickCheck :: forall prop. (Testable prop) => prop -> QC Unit
8589
8690 quickCheck' :: forall prop. (Testable prop) => Number -> prop -> QC Unit
Original file line number Diff line number Diff line change @@ -167,3 +167,15 @@ quickCheck' n prop = do
167167
168168quickCheck :: forall prop . (Testable prop ) => prop -> QC Unit
169169quickCheck prop = quickCheck' 100 prop
170+
171+ -- | Self-documenting equality assertion
172+ (===) :: forall a b . (Eq a , Show a ) => a -> a -> Result
173+ (===) a b = a == b <?> msg
174+ where
175+ msg = show a ++ " /= " ++ show b
176+
177+ -- | Self-documenting inequality assertion
178+ (/==) :: forall a b . (Eq a , Show a ) => a -> a -> Result
179+ (/==) a b = a /= b <?> msg
180+ where
181+ msg = show a ++ " == " ++ show b
You can’t perform that action at this time.
0 commit comments