« Previous | Next » 

Revision 41eb900e

ID41eb900ea2429e083685c590fb274af6c35fbb16
Parent 37519c09
Child 942a9a6a

Added by Iustin Pop over 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 <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences