diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-09-15 21:27:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-15 21:27:23 -0400 |
commit | 0d654d23559b84961b88d5e13fc1393e0f8108bc (patch) | |
tree | c2bdc926e1acdc25d13e8c270bdf1a278f9332bd /src/test | |
parent | 1146a6a1c5e194cc05944622628188c82771a3d4 (diff) | |
download | tor-0d654d23559b84961b88d5e13fc1393e0f8108bc.tar.gz tor-0d654d23559b84961b88d5e13fc1393e0f8108bc.zip |
Replace remaining uses of deprecated test_mem* functions
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test.h | 8 | ||||
-rw-r--r-- | src/test/test_extorport.c | 2 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/test/test.h b/src/test/test.h index 799f208f0d..5d0c062ae6 100644 --- a/src/test/test.h +++ b/src/test/test.h @@ -29,12 +29,6 @@ #define test_streq(expr1, expr2) tt_str_op((expr1), ==, (expr2)) #define test_strneq(expr1, expr2) tt_str_op((expr1), !=, (expr2)) -#define test_mem_op(expr1, op, expr2, len) \ - tt_mem_op((expr1), op, (expr2), (len)) - -#define test_memeq(expr1, expr2, len) test_mem_op((expr1), ==, (expr2), len) -#define test_memneq(expr1, expr2, len) test_mem_op((expr1), !=, (expr2), len) - /* As test_mem_op, but decodes 'hex' before comparing. There must be a * local char* variable called mem_op_hex_tmp for this to work. */ #define test_mem_op_hex(expr1, op, hex) \ @@ -44,7 +38,7 @@ mem_op_hex_tmp = tor_malloc(length/2); \ tor_assert((length&1)==0); \ base16_decode(mem_op_hex_tmp, length/2, hex, length); \ - test_mem_op(expr1, op, mem_op_hex_tmp, length/2); \ + tt_mem_op(expr1, op, mem_op_hex_tmp, length/2); \ STMT_END #define test_memeq_hex(expr1, hex) test_mem_op_hex(expr1, ==, hex) diff --git a/src/test/test_extorport.c b/src/test/test_extorport.c index 698bced7e5..35e7fe5ad9 100644 --- a/src/test/test_extorport.c +++ b/src/test/test_extorport.c @@ -406,7 +406,7 @@ handshake_start(or_connection_t *conn, int receiving) tt_int_op(buf_datalen(TO_CONN(conn)->outbuf), ==, (n)); \ if ((n)) { \ fetch_from_buf(b, (n), TO_CONN(conn)->outbuf); \ - test_memeq(b, (s), (n)); \ + tt_mem_op(b, ==, (s), (n)); \ } \ } while (0) |