diff options
Diffstat (limited to 'test/test_helpers.c')
-rw-r--r-- | test/test_helpers.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/test/test_helpers.c b/test/test_helpers.c deleted file mode 100644 index 187ff73c61..0000000000 --- a/test/test_helpers.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <inttypes.h> - -#include "test_helpers.h" - -void assert_int_equal_impl(const char *file, int line, int64_t a, int64_t b) -{ - if (a != b) { - printf("%s:%d: %"PRId64" != %"PRId64"\n", file, line, a, b); - abort(); - } -} - -void assert_string_equal_impl(const char *file, int line, - const char *a, const char *b) -{ - if (strcmp(a, b) != 0) { - printf("%s:%d: '%s' != '%s'\n", file, line, a, b); - abort(); - } -} - -void assert_float_equal_impl(const char *file, int line, - double a, double b, double tolerance) -{ - if (fabs(a - b) > tolerance) { - printf("%s:%d: %f != %f\n", file, line, a, b); - abort(); - } -} |