]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove dup macros from dbuff_tests
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 12 Jun 2023 16:34:59 +0000 (12:34 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 12 Jun 2023 16:34:59 +0000 (12:34 -0400)
src/lib/util/dbuff_tests.c

index 53c3c0262dbef678edc1a825b47f767b4aa90150..1ef0ceb9660a7ca820032941e0f7747341ada615 100644 (file)
@@ -1,33 +1,9 @@
 #include <freeradius-devel/util/acutest.h>
+#include <freeradius-devel/util/acutest_helpers.h>
 #include <float.h>
 
 #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 <gperftools/profiler.h>
 
 /*