TEST_ASSERT_EQUAL_INT macro does not handle expressions
Status: Pre-Alpha
Brought to you by:
arms22
The following example causes TEST_ASSERT_EQUAL_INT to fail:
TEST_ASSERT_EQUAL_INT(0x1,0x1 | 0x0)
This is due to the lack of parentheses around the 'expected' and 'actual' parameters in the TEST_ASSERT_EQUAL_INT macro.
The following patch appears to resolve the problem:
#define TEST_ASSERT_EQUAL_INT(expected,actual)\
if ((expected) == (actual)) {} else {assertImplementationInt((expected),(actual),__LINE__,__FILE__);return;}
The same can be said about TEST_ASSERT_EQUAL_STRING macro.