aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2015-12-23 22:20:54 -0700
committerkatherine <shmibs@shmibbles.me>2015-12-23 22:20:54 -0700
commita506c233b99e714cfeee226318a0fa456b6449b6 (patch)
treeb34a373509e9d2e218e9b0071503c20de7b2d9f4 /src
parenta0444175e5f6c9e486ac9b0ad005043b94b34fc3 (diff)
downloadsimple-test-a506c233b99e714cfeee226318a0fa456b6449b6.tar.gz
insert forgotten while guards
Diffstat (limited to 'src')
-rw-r--r--src/simple-test.h292
1 files changed, 219 insertions, 73 deletions
diff --git a/src/simple-test.h b/src/simple-test.h
index cb24bc6..821cf89 100644
--- a/src/simple-test.h
+++ b/src/simple-test.h
@@ -747,437 +747,583 @@ do { \
************************/
#define ASSERT(arg) \
+do { \
SIMPLE_TEST_GENERIC_FUNCCALL(SIMPLE_TEST_GENERIC_NOT_STR(arg), #arg, \
- SIMPLE_TEST_GENERIC_NOT(arg), arg, SIMPLE_TEST_TRUE)
+ SIMPLE_TEST_GENERIC_NOT(arg), arg, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
SIMPLE_TEST_GENERIC_FUNCCALL(#arg1, #arg2, \
- arg1, arg2, SIMPLE_TEST_EQ)
+ arg1, arg2, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
SIMPLE_TEST_GENERIC_FUNCCALL(#arg1, #arg2, \
- arg1, arg2, SIMPLE_TEST_NEQ)
+ arg1, arg2, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
SIMPLE_TEST_GENERIC_FUNCCALL(#arg1, #arg2, \
- arg1, arg2, SIMPLE_TEST_G)
+ arg1, arg2, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
SIMPLE_TEST_GENERIC_FUNCCALL(#arg1, #arg2, \
- arg1, arg2, SIMPLE_TEST_GEQ)
+ arg1, arg2, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
SIMPLE_TEST_GENERIC_FUNCCALL(#arg1, #arg2, \
- arg1, arg2, SIMPLE_TEST_L)
+ arg1, arg2, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
SIMPLE_TEST_GENERIC_FUNCCALL(#arg1, #arg2, \
- arg1, arg2, SIMPLE_TEST_LEQ)
+ arg1, arg2, SIMPLE_TEST_LEQ); \
+} while(0)
/*************************
* TYPE-SPECIFIC TESTS *
*************************/
#define ASSERT_BOOL(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK(false, arg); \
simple_test_assert_bool("false", #arg, \
false, (bool)(arg), \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_BOOL_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_bool(#arg1, #arg2, \
(bool)(arg1), (bool)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_BOOL_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_bool(#arg1, #arg2, \
(bool)(arg1), (bool)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_INT(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK(0, arg); \
simple_test_assert_int("0", #arg, \
(intmax_t)0, (intmax_t)(arg), \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_INT_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_int(#arg1, #arg2, \
(intmax_t)(arg1), (intmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_INT_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_int(#arg1, #arg2, \
(intmax_t)(arg1), (intmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_INT_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_int(#arg1, #arg2, \
(intmax_t)(arg1), (intmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_INT_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_int(#arg1, #arg2, \
(intmax_t)(arg1), (intmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_INT_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_int(#arg1, #arg2, \
(intmax_t)(arg1), (intmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_INT_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_int(#arg1, #arg2, \
(intmax_t)(arg1), (intmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#define ASSERT_UINT(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK(0, arg); \
simple_test_assert_uint("0", #arg, \
(uintmax_t)0, (uintmax_t)(arg), \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_UINT_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_uint(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_UINT_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_uint(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_UINT_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_uint(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_UINT_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_uint(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_UINT_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_uint(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_UINT_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_uint(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#define ASSERT_HEX(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK(0, arg2); \
simple_test_assert_uint("0", #arg, \
(uintmax_t)0, (uintmax_t)(arg), \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_HEX_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_uint(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_HEX_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_hex(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_HEX_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_hex(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_HEX_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_hex(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_HEX_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_hex(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_HEX_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_hex(#arg1, #arg2, \
(uintmax_t)(arg1), (uintmax_t)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#define ASSERT_FLOAT(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK(0.0, arg); \
simple_test_assert_float("0", #arg, \
(long double)0, (long double)(arg), \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_FLOAT_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_float(#arg1, #arg2, \
(long double)(arg1), (long double)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_FLOAT_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_float(#arg1, #arg2, \
(long double)(arg1), (long double)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_FLOAT_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_float(#arg1, #arg2, \
(long double)(arg1), (long double)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_FLOAT_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_float(#arg1, #arg2, \
(long double)(arg1), (long double)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_FLOAT_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_float(#arg1, #arg2, \
(long double)(arg1), (long double)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_FLOAT_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_float(#arg1, #arg2, \
(long double)(arg1), (long double)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#define ASSERT_PTR(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK(NULL, arg); \
simple_test_assert_ptr("NULL", #arg, \
NULL, (void *)(arg), \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_PTR_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_ptr(#arg1, #arg2, \
(void *)(arg1), (void *)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_PTR_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_ptr(#arg1, #arg2, \
(void *)(arg1), (void *)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_PTR_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_ptr(#arg1, #arg2, \
(void *)(arg1), (void *)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_PTR_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_ptr(#arg1, #arg2, \
(void *)(arg1), (void *)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_PTR_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_ptr(#arg1, #arg2, \
(void *)(arg1), (void *)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_PTR_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_ptr(#arg1, #arg2, \
(void *)(arg1), (void *)(arg2), \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#define ASSERT_CHAR(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK('\0', arg); \
simple_test_assert_char("\\0", #arg, \
'\0', arg, \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_CHAR_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_char(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_CHAR_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_char(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_CHAR_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_char(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_CHAR_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_char(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_CHAR_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_char(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_CHAR_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_char(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#define ASSERT_STR(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK("0", arg); \
simple_test_assert_str("0", #arg, \
0, (arg), \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_STR_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_str(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_STR_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_str(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_STR_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_str(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_STR_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_str(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_STR_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_str(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_STR_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_str(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#define ASSERT_WCHAR(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK(L'\0', arg2); \
simple_test_assert_wchar("\\0", #arg, \
L'\0', arg, \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_WCHAR_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wchar(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_WCHAR_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wchar(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_WCHAR_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wchar(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_WCHAR_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wchar(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_WCHAR_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wchar(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_WCHAR_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wchar(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#define ASSERT_WSTR(arg) \
+do { \
SIMPLE_TEST_TYPE_CHECK(L"0", arg); \
simple_test_assert_wstr("0", #arg, \
0, (arg), \
- __FILE__, __LINE__, SIMPLE_TEST_TRUE)
+ __FILE__, __LINE__, SIMPLE_TEST_TRUE); \
+} while(0)
#define ASSERT_WSTR_EQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wstr(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_EQ)
+ __FILE__, __LINE__, SIMPLE_TEST_EQ); \
+} while(0)
#define ASSERT_WSTR_NEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wstr(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_NEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_NEQ); \
+} while(0)
#define ASSERT_WSTR_G(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wstr(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_G)
+ __FILE__, __LINE__, SIMPLE_TEST_G); \
+} while(0)
#define ASSERT_WSTR_GEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wstr(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_GEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_GEQ); \
+} while(0)
#define ASSERT_WSTR_L(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wstr(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_L)
+ __FILE__, __LINE__, SIMPLE_TEST_L); \
+} while(0)
#define ASSERT_WSTR_LEQ(arg1, arg2) \
+do { \
SIMPLE_TEST_TYPE_CHECK(arg1, arg2); \
simple_test_assert_wstr(#arg1, #arg2, \
arg1, arg2, \
- __FILE__, __LINE__, SIMPLE_TEST_LEQ)
+ __FILE__, __LINE__, SIMPLE_TEST_LEQ); \
+} while(0)
#endif