aboutsummaryrefslogtreecommitdiff
path: root/tests/ds
diff options
context:
space:
mode:
authorMosder <git@mosder.eu>2026-09-12 15:53:50 +0200
committerMosder <git@mosder.eu>2026-09-12 15:53:50 +0200
commit0ef02ddf28c626916da9d5c7081a01ab707be8ce (patch)
treefe6b6a4aca781f32ae402cf757decccca3aaf2d6 /tests/ds
parent4606672f2340d4945654701b043284dc0a868a6d (diff)
feat: implemented hashmap
Diffstat (limited to 'tests/ds')
-rw-r--r--tests/ds/hashmap_tests.c3
1 files changed, 2 insertions, 1 deletions
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;