summaryrefslogtreecommitdiffstats
path: root/src/test/test-prioq.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/test-prioq.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c
index 540863c..92c22d3 100644
--- a/src/test/test-prioq.c
+++ b/src/test/test-prioq.c
@@ -54,7 +54,7 @@ static int test_compare(const struct test *x, const struct test *y) {
}
static void test_hash(const struct test *x, struct siphash *state) {
- siphash24_compress(&x->value, sizeof(x->value), state);
+ siphash24_compress_typesafe(x->value, state);
}
DEFINE_PRIVATE_HASH_OPS(test_hash_ops, struct test, test_hash, test_compare);
@@ -70,10 +70,10 @@ TEST(struct) {
assert_se(q = prioq_new((compare_func_t) test_compare));
assert_se(s = set_new(&test_hash_ops));
- assert_se(prioq_peek(q) == NULL);
- assert_se(prioq_peek_by_index(q, 0) == NULL);
- assert_se(prioq_peek_by_index(q, 1) == NULL);
- assert_se(prioq_peek_by_index(q, UINT_MAX) == NULL);
+ ASSERT_NULL(prioq_peek(q));
+ ASSERT_NULL(prioq_peek_by_index(q, 0));
+ ASSERT_NULL(prioq_peek_by_index(q, 1));
+ ASSERT_NULL(prioq_peek_by_index(q, UINT_MAX));
for (i = 0; i < SET_SIZE; i++) {
assert_se(t = new0(struct test, 1));
@@ -87,7 +87,7 @@ TEST(struct) {
for (i = 0; i < SET_SIZE; i++)
assert_se(prioq_peek_by_index(q, i));
- assert_se(prioq_peek_by_index(q, SET_SIZE) == NULL);
+ ASSERT_NULL(prioq_peek_by_index(q, SET_SIZE));
unsigned count = 0;
PRIOQ_FOREACH_ITEM(q, t) {