From a505fe156ba508d200731bc0e8f54d87dc7c4a8c Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Mon, 10 Jun 2024 06:30:38 +0200 Subject: Cleanup --- source/tests/array_ref.test.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/tests/array_ref.test.c') diff --git a/source/tests/array_ref.test.c b/source/tests/array_ref.test.c index 921e9fd..036e802 100644 --- a/source/tests/array_ref.test.c +++ b/source/tests/array_ref.test.c @@ -26,8 +26,14 @@ TEST("array ref equal") { REQUIRE(AR_EQUAL(foo_ref, bar_ref)); } -static int compare(int *left, int *right) { - return *left - *right; +static i8 compare(void *left_, void *right_) { + int *left = (int *) left_; + int *right = (int *) right_; + if (*left < *right) + return -1; + if (*left > *right) + return 1; + return 0; } TEST("array ref compare") { -- cgit v1.2.3