aboutsummaryrefslogtreecommitdiff
path: root/tests/test-qht.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-qht.c')
-rw-r--r--tests/test-qht.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test-qht.c b/tests/test-qht.c
index b069881342..dda6a067be 100644
--- a/tests/test-qht.c
+++ b/tests/test-qht.c
@@ -27,11 +27,17 @@ static void insert(int a, int b)
for (i = a; i < b; i++) {
uint32_t hash;
+ void *existing;
+ bool inserted;
arr[i] = i;
hash = i;
- qht_insert(&ht, &arr[i], hash);
+ inserted = qht_insert(&ht, &arr[i], hash, NULL);
+ g_assert_true(inserted);
+ inserted = qht_insert(&ht, &arr[i], hash, &existing);
+ g_assert_false(inserted);
+ g_assert_true(existing == &arr[i]);
}
}