diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-02 14:32:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-02 14:32:05 -0400 |
commit | 4458fd0cd8fa259f0ee8195e1aa86d5b7c6f8919 (patch) | |
tree | b7b8886da56232e92a0438edd2a869f6964141a4 /src/test/test_addr.c | |
parent | 1bfda600c338cd8f7d6b9acc7613b5567e6ee03f (diff) | |
download | tor-4458fd0cd8fa259f0ee8195e1aa86d5b7c6f8919.tar.gz tor-4458fd0cd8fa259f0ee8195e1aa86d5b7c6f8919.zip |
In the unit tests, use "test_eq_ptr" and "test_neq_ptr" consistently
This is part of what's needed to build without warnings on mingw64:
it was warning about the cast from void* to long that happened in
the places we were using test_{n,}eq on pointers.
The alternative here would have been to broaden tt_int_op to accept
a long long or an intptr_t, but that's less correct (since pointers
aren't integers), and would hurt the portability of tinytest a
little.
Fixes part of 7260.
Diffstat (limited to 'src/test/test_addr.c')
-rw-r--r-- | src/test/test_addr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_addr.c b/src/test/test_addr.c index 0dcc0174a8..343ec6d3c2 100644 --- a/src/test/test_addr.c +++ b/src/test/test_addr.c @@ -38,7 +38,7 @@ test_addr_basic(void) tor_free(cp); u32 = 3; test_assert(!addr_port_lookup(LOG_WARN, "localhost", NULL, &u32, &u16)); - test_eq(cp, NULL); + test_eq_ptr(cp, NULL); test_eq(u32, 0x7f000001u); test_eq(u16, 0); tor_free(cp); |