Revision 41eb900e htest/Test/Ganeti/TestCommon.hs

b/htest/Test/Ganeti/TestCommon.hs
73 73

  
74 74
-- * Helper functions
75 75

  
76
-- | Checks for equality with proper annotation.
76
-- | Checks for equality with proper annotation. The first argument is
77
-- the computed value, the second one the expected value.
77 78
(==?) :: (Show a, Eq a) => a -> a -> Property
78 79
(==?) x y = printTestCase
79
            ("Expected equality, but '" ++
80
             show x ++ "' /= '" ++ show y ++ "'") (x == y)
80
            ("Expected equality, but got mismatch\nexpected: " ++
81
             show x ++ "\n but got: " ++ show y) (x == y)
81 82
infix 3 ==?
82 83

  
83
-- | Checks for inequality with proper annotation.
84
-- | Checks for inequality with proper annotation. The first argument
85
-- is the computed value, the second one the expected (not equal)
86
-- value.
84 87
(/=?) :: (Show a, Eq a) => a -> a -> Property
85 88
(/=?) x y = printTestCase
86 89
            ("Expected inequality, but got equality: '" ++

Also available in: Unified diff