Currently one gets a compile error if they use the
CU_ASSERT macro as an expression. For example:
static void test_dummytest(void)
{
int ret;
ret = 7; if( ! CU_ASSERT(ret == 7) ) { printf("Emergency Clean-up needed."); } return;
}
This will return a parse compile error.
If the CU_ASSERT macro was defined as:
CU_assertImplementation((value), LINE, #value,
FILE, "", FALSE)
rather than
{ CU_assertImplementation((value), LINE, #value,
FILE, "", FALSE);}
The above test would compile and operate correctly.
On the downside, this will force all CU_ASSERT macros
to be terminated with a semi-colon (which is how they
are in all the examples anyway).
Anonymous
Logged In: YES
user_id=154946
Would fix in the CVS, would go in next release.