commit
0d5b8b884f
@ -1,3 +1,8 @@
|
||||
## 1.5.6
|
||||
|
||||
* Add assertNotEq.
|
||||
[#1375](https://github.com/yesodweb/yesod/pull/1375)
|
||||
|
||||
## 1.5.5
|
||||
|
||||
* Fix warnings
|
||||
|
||||
@ -86,6 +86,7 @@ module Yesod.Test
|
||||
|
||||
-- * Assertions
|
||||
, assertEqual
|
||||
, assertNotEq
|
||||
, assertEqualNoShow
|
||||
, assertEq
|
||||
|
||||
@ -335,6 +336,17 @@ assertEq m a b =
|
||||
"First argument: " ++ ppShow a ++ "\n" ++
|
||||
"Second argument: " ++ ppShow b ++ "\n"
|
||||
|
||||
-- | Asserts that the two given values are not equal.
|
||||
--
|
||||
-- In case they are equal, error mesasge includes the values.
|
||||
--
|
||||
-- @since 1.5.6
|
||||
assertNotEq :: (Eq a, Show a) => String -> a -> a -> YesodExample site ()
|
||||
assertNotEq m a b =
|
||||
liftIO $ HUnit.assertBool msg (a /= b)
|
||||
where msg = "Assertion: " ++ m ++ "\n" ++
|
||||
"Both arguments: " ++ ppShow a ++ "\n"
|
||||
|
||||
{-# DEPRECATED assertEqual "Use assertEq instead" #-}
|
||||
assertEqual :: (Eq a) => String -> a -> a -> YesodExample site ()
|
||||
assertEqual = assertEqualNoShow
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: yesod-test
|
||||
version: 1.5.5
|
||||
version: 1.5.6
|
||||
license: MIT
|
||||
license-file: LICENSE
|
||||
author: Nubis <nubis@woobiz.com.ar>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user