It would be of great help to provide more information
in the message when CU_ASSERT_EQUAL fails.
For example: "Expected: A, actual: B"
instead of the line number and the code. This way it
is possible to determine what went wrong without using
the debugger.
Anonymous
Logged In: YES
user_id=261025
I would find this very useful. Here's the sort of thing I
would want.
CU_ASSERT_DOUBLE_EQUAL(total_charges,91 * 5.5,0.00000001)
(495.00000000 == 500.50000000)
(I achieved this by redefining CU_ASSERT_DOUBLE_EQUAL.)
From my point of view, I'd like to see it as a #define
option when I compile my tests (#ifdef CU_VERBOSE), and this
is probably the simplest to implement. Alternative solutions
could possibly involve CU_basic_set_mode() [I'm not sure
this is possible] or a configuration flag when building the
library.
While I think that displaying numerics is fairly straight
forward (but how much precision for doubles?), it is less
clear how strings should be displayed. These will often
contain linefeeds and an unexpected string could contain all
kinds of gubbins.
I'd like to have the expected / actual information to all Assertions.
is there any update on this request?
Same thing here, this would be very interesting for us as well.
Same. Is CUnit a live project?
Yes CUnit is now hosted on gitlab.com at https://gitlab.com/cunity/cunit
I have logged this over in gitlab https://gitlab.com/cunity/cunit/issues/26