From 0ef02ddf28c626916da9d5c7081a01ab707be8ce Mon Sep 17 00:00:00 2001 From: Mosder Date: Sat, 12 Sep 2026 15:53:50 +0200 Subject: feat: implemented hashmap --- tests/ds/hashmap_tests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/ds/hashmap_tests.c') diff --git a/tests/ds/hashmap_tests.c b/tests/ds/hashmap_tests.c index 49e4261..749564a 100644 --- a/tests/ds/hashmap_tests.c +++ b/tests/ds/hashmap_tests.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include "hashmap_tests.h" #include "moslib/ds/hashmap.h" @@ -101,7 +102,7 @@ Test looping() { E items[] = {{1, 10}, {2, 20}, {3, 30}}; arr_append_n(allowed, items, 3); - test_assert(memcmp(hm_first(hm), hm_next(hm, NULL), sizeof(E)), "hm_next(hm, NULL) != hm_first(hm)"); + test_assert(memcmp(hm_first(hm), hm_next(hm, NULL), sizeof(E)) == 0, "hm_next(hm, NULL) != hm_first(hm)"); E *e = NULL; while ((e = hm_next(hm, e))) { int flag = 0; -- cgit v1.2.3