Commit 6851e5e5 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

bc_tester_utils.h: fix some macros and update ms2 as well

parent dc4ee10c
mediastreamer2 @ ca5e8a01
Subproject commit d584fc65538391e95785461a9082b885a5171938 Subproject commit ca5e8a01b73f0c8fe0e3eddfd58221cf1c9e33ff
...@@ -132,7 +132,7 @@ char * bc_tester_res(const char *name); ...@@ -132,7 +132,7 @@ char * bc_tester_res(const char *name);
} }
#define BC_ASSERT_GREATER_INT(actual, expected) { \ #define BC_ASSERT_GREATER_INT(actual, expected) { \
int cactual = (actual), cexpected = (expected); \ int cactual = (actual), cexpected = (expected); \
if (! BC_ASSERT_LOWER(cactual, cexpected)) { \ if (! BC_ASSERT_GREATER(cactual, cexpected)) { \
bc_tester_printf(bc_printf_verbosity_error, "%s:%d - Expected " #actual " >= " #expected " but was %d < %d\n", __FILE__, __LINE__, cactual, cexpected); \ bc_tester_printf(bc_printf_verbosity_error, "%s:%d - Expected " #actual " >= " #expected " but was %d < %d\n", __FILE__, __LINE__, cactual, cexpected); \
} \ } \
} }
...@@ -150,7 +150,7 @@ char * bc_tester_res(const char *name); ...@@ -150,7 +150,7 @@ char * bc_tester_res(const char *name);
} }
#define BC_ASSERT_LOWER_UINT64_T(actual, expected) { \ #define BC_ASSERT_LOWER_UINT64_T(actual, expected) { \
uint64_t cactual = (actual), cexpected = (expected); \ uint64_t cactual = (actual), cexpected = (expected); \
if (! BC_ASSERT_GREATER(cactual, cexpected)) { \ if (! BC_ASSERT_LOWER(cactual, cexpected)) { \
bc_tester_printf(bc_printf_verbosity_error, "%s:%d - Expected " #actual " <= " #expected " but was %lu > %lu\n", __FILE__, __LINE__, (long unsigned)cactual, (long unsigned)cexpected); \ bc_tester_printf(bc_printf_verbosity_error, "%s:%d - Expected " #actual " <= " #expected " but was %lu > %lu\n", __FILE__, __LINE__, (long unsigned)cactual, (long unsigned)cexpected); \
} \ } \
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment