« Previous | Next » 

Revision 41eb900e

Parent 37519c09
Child 942a9a6a

Added by Iustin Pop about 11 years ago

Improve message for (==?) operator

After seeing how nice HUnit formats the error message on failed
'assertEqual', I think we can do better with ==?. Currently it says
(on one line): "Expected equality, but 1 /= 2".

This patch changes the code to format it similar to HUnit:

Expected equality, but got mismatch
expected: 1
but got: 2

(on three lines). This makes it more clear what is the expected and
what is the wrong value.

A few tests have been modified to ensure that the expected value is
the second argument to ==?. This is different than HUnit, but makes
more sense in the operator version (I think).

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences