From 9fd709deacefb022641d8f5c4dedc5e28eafb85a Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 2 Mar 2019 14:15:29 -0500 Subject: add test_long_equals --- test.c | 5 +++++ test.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/test.c b/test.c index 5a009fc..d7c9a8f 100644 --- a/test.c +++ b/test.c @@ -88,6 +88,11 @@ void test_int_equals_imp(const char *expression, int result, int expected) print_result(result == expected, "%s == %d", expression, expected); } +void test_long_equals_imp(const char *expression, long result, long expected) +{ + print_result(result == expected, "%s == %l", expression, expected); +} + void test_double_imp(const char *expression, double result, double expected) { int success = (result - expected < DBL_EPSILON); diff --git a/test.h b/test.h index 43d7512..4352c32 100644 --- a/test.h +++ b/test.h @@ -7,6 +7,9 @@ void testing_end(void); void test_int_equals_imp(const char*, int, int); #define test_int_equals(expression, expected) test_int_equals_imp(#expression, expression, expected) +void test_long_equals_imp(const char*, long, long); +#define test_long_equals(expression, expected) test_int_equals_imp(#expression, expression, expected) + void test_double_imp(const char*, double, double); #define test_double(expression, expected) test_double_imp(#expression, expression, expected) -- cgit v1.2.1