diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-03-02 14:15:29 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-03-02 14:15:29 -0500 |
commit | 9fd709deacefb022641d8f5c4dedc5e28eafb85a (patch) | |
tree | 914775cf29b032a77cd6bd97a8ea3fdc7c3a2d35 | |
parent | 6d9ef3245dfc8cbcc2e1d3f28e05090f1ed766a8 (diff) |
add test_long_equals
-rw-r--r-- | test.c | 5 | ||||
-rw-r--r-- | test.h | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -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); @@ -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) |