do { \
const char *_a = (a), *_b = (b); \
if (strcmp(_a ? _a : "", _b ? _b : "")) \
__np_assert_failed(__FILE__, __LINE__, \
"NP_ASSERT_STR_EQUAL(" #a "=\"%s\", " #b "=\"%s\")", _a, _b); \
} while(0)
Test that two strings are equal, otherwise FAIL the test. Either string can be NULL; NULL compares like the empty string.