diff options
| -rw-r--r-- | test/include/BH/Unit.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/include/BH/Unit.h b/test/include/BH/Unit.h index 9f9b3bb..a831ee3 100644 --- a/test/include/BH/Unit.h +++ b/test/include/BH/Unit.h @@ -40,10 +40,13 @@ typedef int (*BH_UnitCallback)(void); #define BH_VERIFY_STR_EQ(actual, expected) \ do { \ - BH_VERIFY((actual) != NULL && (expected) != NULL); \ - if (strcmp((actual), (expected)) != 0) { \ + const char *a, *b; \ + a = (actual); \ + b = (expected); \ + BH_VERIFY(a != NULL && b != NULL); \ + if (strcmp(a, b) != 0) { \ printf("%s:%d\tExpected '%s', got '%s'\n", \ - __FILE__, __LINE__, (expected), (actual)); \ + __FILE__, __LINE__, a, b); \ return -1; \ } \ } while(0) |
