diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-06 18:06:08 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-03-06 18:06:08 -0500 |
commit | 1365ff5b9a04a7da2acc2e52df18a61b6cb39fe6 (patch) | |
tree | 0ada1a483eab86cdda00ea3728394a5482376b60 /src/ext/tinytest_macros.h | |
parent | 065097b81bad3326a9bd536fbdf646f408638a94 (diff) | |
download | tor-1365ff5b9a04a7da2acc2e52df18a61b6cb39fe6.tar.gz tor-1365ff5b9a04a7da2acc2e52df18a61b6cb39fe6.zip |
Upgrade to the latest version of tinytest.
This brings us to tinytest commit 709a36ba63ff16d8.
The only big change tor-side is that we don't need our own test_mem_op
operation any longer.
Diffstat (limited to 'src/ext/tinytest_macros.h')
-rw-r--r-- | src/ext/tinytest_macros.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ext/tinytest_macros.h b/src/ext/tinytest_macros.h index 5bb8f8ec69..db2dfcbe6b 100644 --- a/src/ext/tinytest_macros.h +++ b/src/ext/tinytest_macros.h @@ -171,6 +171,16 @@ (val1_ && val2_ && strcmp(val1_,val2_) op 0),"<%s>", \ TT_EXIT_TEST_FUNCTION) +#define tt_mem_op(expr1, op, expr2, len) \ + tt_assert_test_fmt_type(expr1,expr2,#expr1" "#op" "#expr2, \ + const char *, \ + (val1_ && val2_ && memcmp(val1_, val2_, len) op 0), \ + char *, "%s", \ + { print_ = tinytest_format_hex_(value_, (len)); }, \ + { if (print_) free(print_); }, \ + TT_EXIT_TEST_FUNCTION \ + ); + #define tt_want_int_op(a,op,b) \ tt_assert_test_type(a,b,#a" "#op" "#b,long,(val1_ op val2_),"%ld",(void)0) |