From: Arran Cudbard-Bell Date: Mon, 12 Jun 2023 16:34:59 +0000 (-0400) Subject: Remove dup macros from dbuff_tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efffddbda4f821a3328fece882b6302144fb0bae;p=thirdparty%2Ffreeradius-server.git Remove dup macros from dbuff_tests --- diff --git a/src/lib/util/dbuff_tests.c b/src/lib/util/dbuff_tests.c index 53c3c0262db..1ef0ceb9660 100644 --- a/src/lib/util/dbuff_tests.c +++ b/src/lib/util/dbuff_tests.c @@ -1,33 +1,9 @@ #include +#include #include #include "dbuff.h" -/* - * We're testing float equality not by adding numbers, but by - * copying memory to / from network buffers. Disable this - * spurious warning. - * - * The tests should arguably be doing memcmp(), to ensure that - * the floats are equal on a *bit* level, not on a *semantic* - * level. - */ -#define TEST_CHECK_LEN(_got, _exp) \ -do { \ - size_t _our_got = (_got); \ - TEST_CHECK((_exp) == (_our_got)); \ - TEST_MSG("Expected length : %zu", (ssize_t)_exp); \ - TEST_MSG("Got length : %zu", (ssize_t)_our_got); \ -} while(0) - -#define TEST_CHECK_SLEN(_got, _exp) \ -do { \ - ssize_t _our_got = (_got); \ - TEST_CHECK((_exp) == (_our_got)); \ - TEST_MSG("Expected length : %zd", (ssize_t)_exp); \ - TEST_MSG("Got length : %zd", (ssize_t)_our_got); \ -} while(0) - //#include /*