diff options
author | sanine <sanine.not@pm.me> | 2022-11-25 12:06:31 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-11-25 12:06:31 -0600 |
commit | 64477ce06280b8882730459d627ae7028b15bbeb (patch) | |
tree | 00d492d88376c9cc0e15d1dd875edae5c846b5c1 | |
parent | e16b477baa9c8ce3ae6757417620ef4a7d2d46ba (diff) |
fix location bug in some testsauto-register
-rw-r--r-- | lily-test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lily-test.c b/lily-test.c index 50e369f..e9be911 100644 --- a/lily-test.c +++ b/lily-test.c @@ -210,7 +210,7 @@ void _lily_assert_int_not_equal(const char *name_a, const char *name_b, void _lily_assert_float_equal(const char *name_a, const char *name_b, double a, double b, double epsilon, const char *location) { - lily_assert_msg(fabs(a - b) <= epsilon, + lily_assert_msg(fabs(a - b) <= epsilon, location, "%s (%f) is not equal to %s (%f) (epsilon: %f)", name_a, a, name_b, b, epsilon); } @@ -219,7 +219,7 @@ void _lily_assert_float_equal(const char *name_a, const char *name_b, void _lily_assert_float_not_equal(const char *name_a, const char *name_b, double a, double b, double epsilon, const char *location) { - lily_assert_msg(fabs(a - b) > epsilon, + lily_assert_msg(fabs(a - b) > epsilon, location, "%s (%f) is equal to %s (%f) (epsilon: %f)", name_a, a, name_b, b, epsilon); } @@ -228,7 +228,7 @@ void _lily_assert_float_not_equal(const char *name_a, const char *name_b, void _lily_assert_string_equal(const char *name_a, const char *name_b, char *a, char *b, const char *location) { - lily_assert_msg(strcmp(a, b) == 0, + lily_assert_msg(strcmp(a, b) == 0, location, "%s ('%s') is not equal to %s ('%s')", name_a, a, name_b, b); } @@ -237,7 +237,7 @@ void _lily_assert_string_equal(const char *name_a, const char *name_b, void _lily_assert_string_not_equal(const char *name_a, const char *name_b, char *a, char *b, const char *location) { - lily_assert_msg(strcmp(a, b) != 0, + lily_assert_msg(strcmp(a, b) != 0, location, "%s ('%s') is equal to %s", name_a, a, name_b); } @@ -246,7 +246,7 @@ void _lily_assert_string_not_equal(const char *name_a, const char *name_b, void _lily_assert_memory_equal(const char *name_a, const char *name_b, void *a, void *b, size_t size, const char *location) { - lily_assert_msg(memcmp(a, b, size) == 0, + lily_assert_msg(memcmp(a, b, size) == 0, location, "%s and %s contain different data", name_a, name_b); } @@ -254,7 +254,7 @@ void _lily_assert_memory_equal(const char *name_a, const char *name_b, void _lily_assert_memory_not_equal(const char *name_a, const char *name_b, void *a, void *b, size_t size, const char *location) { - lily_assert_msg(memcmp(a, b, size) == 0, + lily_assert_msg(memcmp(a, b, size) == 0, location, "%s contains the same data s %s", name_a, name_b); } |