24 RCSIDH(acutest_helpers_h,
"$Id: 4218ec7df6f779aaebf934b72565210e2b7b7578 $")
30 #define TEST_CHECK_LEN(_got, _exp) \
32 size_t _our_got = (_got); \
33 TEST_CHECK_(_exp == _our_got, "%s", #_got); \
34 TEST_MSG("Expected length : %zu", (size_t)_exp); \
35 TEST_MSG("Got length : %zu", (size_t)_our_got); \
38 #define TEST_CHECK_SLEN(_got, _exp) \
40 ssize_t _our_got = (_got); \
41 TEST_CHECK_(_exp == _our_got, "%s", #_got); \
42 TEST_MSG("Expected length : %zd", (ssize_t)_exp); \
43 TEST_MSG("Got length : %zd", (ssize_t)_our_got); \
46 #define TEST_CHECK_SLEN_RETURN(_got, _exp) \
48 ssize_t _our_got = (_got); \
49 TEST_CHECK_(_exp == _our_got, "%s", #_got); \
50 TEST_MSG("Expected length : %zd", (ssize_t)_exp); \
51 TEST_MSG("Got length : %zd", (ssize_t)_our_got); \
52 if (_exp != _our_got) return; \
55 #define TEST_CHECK_RET(_got, _exp) \
57 int _our_got = (_got); \
58 TEST_CHECK_(_exp == _our_got, "%s", #_got); \
59 TEST_MSG("Expected ret : %"PRId64, (int64_t)_exp); \
60 TEST_MSG("Got ret : %"PRId64, (int64_t)_our_got); \
63 #define TEST_CHECK_STRCMP(_got, _exp) \
65 char const *_our_got = (_got); \
66 TEST_CHECK_(((_exp) != NULL) && ((_got) != NULL) && (strcmp(_exp, _our_got) == 0), "%s", #_got); \
67 TEST_MSG("Expected : \"%s\"", _exp); \
68 TEST_MSG("Got : \"%s\"", _our_got); \