|
Philip Kovacs |
0865bd |
diff --git a/testsuite/slurm_unit/common/xhash-test.c b/testsuite/slurm_unit/common/xhash-test.c
|
|
Philip Kovacs |
0865bd |
index 54164ae6e6..46616aef2b 100644
|
|
Philip Kovacs |
0865bd |
--- a/testsuite/slurm_unit/common/xhash-test.c
|
|
Philip Kovacs |
0865bd |
+++ b/testsuite/slurm_unit/common/xhash-test.c
|
|
Philip Kovacs |
0865bd |
@@ -68,7 +68,7 @@ uint32_t g_hashableslen = sizeof(g_hashables)/sizeof(g_hashables[0]);
|
|
Philip Kovacs |
0865bd |
static void setup(void)
|
|
Philip Kovacs |
0865bd |
{
|
|
Philip Kovacs |
0865bd |
int i;
|
|
Philip Kovacs |
0865bd |
- g_ht = xhash_init(hashable_identify, NULL, NULL, 0);
|
|
Philip Kovacs |
0865bd |
+ g_ht = xhash_init(hashable_identify, NULL);
|
|
Philip Kovacs |
0865bd |
if (!g_ht) return; /* fatal error, will be detected by test cases */
|
|
Philip Kovacs |
0865bd |
for (i = 0; i < g_hashableslen; ++i) {
|
|
Philip Kovacs |
0865bd |
g_hashables[i].id[0] = 0;
|
|
Philip Kovacs |
0865bd |
@@ -95,11 +95,11 @@ START_TEST(test_init_free)
|
|
Philip Kovacs |
0865bd |
mark_point();
|
|
Philip Kovacs |
0865bd |
|
|
Philip Kovacs |
0865bd |
/* invalid case */
|
|
Philip Kovacs |
0865bd |
- ht = xhash_init(NULL, NULL, NULL, 0);
|
|
Philip Kovacs |
0865bd |
+ ht = xhash_init(NULL, NULL);
|
|
Philip Kovacs |
0865bd |
fail_unless(ht == NULL, "allocated table without identifying function");
|
|
Philip Kovacs |
0865bd |
|
|
Philip Kovacs |
0865bd |
/* alloc and free */
|
|
Philip Kovacs |
0865bd |
- ht = xhash_init(hashable_identify, NULL, NULL, 0);
|
|
Philip Kovacs |
0865bd |
+ ht = xhash_init(hashable_identify, NULL);
|
|
Philip Kovacs |
0865bd |
fail_unless(ht != NULL, "hash table was not allocated");
|
|
Philip Kovacs |
0865bd |
xhash_free(ht);
|
|
Philip Kovacs |
0865bd |
}
|
|
Philip Kovacs |
0865bd |
@@ -111,7 +111,7 @@ START_TEST(test_add)
|
|
Philip Kovacs |
0865bd |
hashable_t a[4] = {{"0", 0}, {"1", 1}, {"2", 2}, {"3", 3}};
|
|
Philip Kovacs |
0865bd |
int i, len = sizeof(a)/sizeof(a[0]);
|
|
Philip Kovacs |
0865bd |
char buffer[255];
|
|
Philip Kovacs |
0865bd |
- ht = xhash_init(hashable_identify, NULL, NULL, 0);
|
|
Philip Kovacs |
0865bd |
+ ht = xhash_init(hashable_identify, NULL);
|
|
Philip Kovacs |
0865bd |
fail_unless(xhash_add(NULL, a) == NULL, "invalid cases not null");
|
|
Philip Kovacs |
0865bd |
fail_unless(xhash_add(ht, NULL) == NULL, "invalid cases not null");
|
|
Philip Kovacs |
0865bd |
fail_unless(xhash_add(ht, a) != NULL, "xhash_add failed");
|
|
Philip Kovacs |
0865bd |
@@ -207,7 +207,7 @@ START_TEST(test_count)
|
|
Philip Kovacs |
0865bd |
hashable_t a[4] = {{"0", 0}, {"1", 1}, {"2", 2}, {"3", 3}};
|
|
Philip Kovacs |
0865bd |
fail_unless(xhash_count(ht) == g_hashableslen,
|
|
Philip Kovacs |
0865bd |
"invalid count (fixture table)");
|
|
Philip Kovacs |
0865bd |
- ht = xhash_init(hashable_identify, NULL, NULL, 0);
|
|
Philip Kovacs |
0865bd |
+ ht = xhash_init(hashable_identify, NULL);
|
|
Philip Kovacs |
0865bd |
xhash_add(ht, a);
|
|
Philip Kovacs |
0865bd |
xhash_add(ht, a+1);
|
|
Philip Kovacs |
0865bd |
xhash_add(ht, a+2);
|