mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-17 00:07:04 -04:00
Update to a more recent tinytest_macros.
This one has less of a tendency to suppress important type warnings.
This commit is contained in:
parent
28db827efa
commit
8da5a1864c
@ -1534,9 +1534,9 @@ test_evbuffer_callbacks(void *ptr)
|
||||
tt_assert(!evbuffer_remove_cb(buf, log_change_callback, buf_out2));
|
||||
evbuffer_validate(buf);
|
||||
|
||||
tt_str_op(evbuffer_pullup(buf_out1, -1), ==,
|
||||
tt_str_op((const char *) evbuffer_pullup(buf_out1, -1), ==,
|
||||
"0->36; 36->26; 26->31; 31->38; ");
|
||||
tt_str_op(evbuffer_pullup(buf_out2, -1), ==,
|
||||
tt_str_op((const char *) evbuffer_pullup(buf_out2, -1), ==,
|
||||
"0->36; 31->38; 38->0; 0->1; ");
|
||||
evbuffer_drain(buf_out1, evbuffer_get_length(buf_out1));
|
||||
evbuffer_drain(buf_out2, evbuffer_get_length(buf_out2));
|
||||
@ -1552,7 +1552,7 @@ test_evbuffer_callbacks(void *ptr)
|
||||
tt_uint_op(evbuffer_get_length(buf_out2), ==, 0);
|
||||
evbuffer_setcb(buf, NULL, NULL);
|
||||
evbuffer_add_printf(buf, "This will not.");
|
||||
tt_str_op(evbuffer_pullup(buf, -1), ==, "This will not.");
|
||||
tt_str_op((const char *) evbuffer_pullup(buf, -1), ==, "This will not.");
|
||||
evbuffer_validate(buf);
|
||||
evbuffer_drain(buf, evbuffer_get_length(buf));
|
||||
evbuffer_validate(buf);
|
||||
|
@ -113,8 +113,8 @@
|
||||
#define tt_assert_test_fmt_type(a,b,str_test,type,test,printf_type,printf_fmt, \
|
||||
setup_block,cleanup_block,die_on_fail) \
|
||||
TT_STMT_BEGIN \
|
||||
type val1_ = (type)(a); \
|
||||
type val2_ = (type)(b); \
|
||||
type val1_ = (a); \
|
||||
type val2_ = (b); \
|
||||
int tt_status_ = (test); \
|
||||
if (!tt_status_ || tinytest_get_verbosity_()>1) { \
|
||||
printf_type print_; \
|
||||
@ -163,7 +163,7 @@
|
||||
(val1_ op val2_),"%lu",TT_EXIT_TEST_FUNCTION)
|
||||
|
||||
#define tt_ptr_op(a,op,b) \
|
||||
tt_assert_test_type(a,b,#a" "#op" "#b,void*, \
|
||||
tt_assert_test_type(a,b,#a" "#op" "#b,const void*, \
|
||||
(val1_ op val2_),"%p",TT_EXIT_TEST_FUNCTION)
|
||||
|
||||
#define tt_str_op(a,op,b) \
|
||||
@ -173,7 +173,7 @@
|
||||
|
||||
#define tt_mem_op(expr1, op, expr2, len) \
|
||||
tt_assert_test_fmt_type(expr1,expr2,#expr1" "#op" "#expr2, \
|
||||
const char *, \
|
||||
const void *, \
|
||||
(val1_ && val2_ && memcmp(val1_, val2_, len) op 0), \
|
||||
char *, "%s", \
|
||||
{ print_ = tinytest_format_hex_(value_, (len)); }, \
|
||||
@ -189,7 +189,7 @@
|
||||
(val1_ op val2_),"%lu",(void)0)
|
||||
|
||||
#define tt_want_ptr_op(a,op,b) \
|
||||
tt_assert_test_type(a,b,#a" "#op" "#b,void*, \
|
||||
tt_assert_test_type(a,b,#a" "#op" "#b,const void*, \
|
||||
(val1_ op val2_),"%p",(void)0)
|
||||
|
||||
#define tt_want_str_op(a,op,b) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user