summaryrefslogtreecommitdiffstats
path: root/src/test/test-hashmap.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
commit78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch)
treef515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/test/test-hashmap.c
parentAdding debian version 255.5-1. (diff)
downloadsystemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz
systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test-hashmap.c')
-rw-r--r--src/test/test-hashmap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c
index 5daa0e6..74e68a4 100644
--- a/src/test/test-hashmap.c
+++ b/src/test/test-hashmap.c
@@ -42,7 +42,7 @@ TEST(trivial_compare_func) {
}
TEST(string_compare_func) {
- assert_se(string_compare_func("fred", "wilma") != 0);
+ ASSERT_NE(string_compare_func("fred", "wilma"), 0);
assert_se(string_compare_func("fred", "fred") == 0);
}
@@ -98,8 +98,8 @@ TEST(iterated_cache) {
hashmap_clear(m);
compare_cache(m, c);
- assert_se(hashmap_free(m) == NULL);
- assert_se(iterated_cache_free(c) == NULL);
+ ASSERT_NULL(hashmap_free(m));
+ ASSERT_NULL(iterated_cache_free(c));
}
TEST(hashmap_put_strdup) {
@@ -116,7 +116,7 @@ TEST(hashmap_put_strdup) {
assert_se(hashmap_contains(m, "foo"));
s = hashmap_get(m, "foo");
- assert_se(streq(s, "bar"));
+ ASSERT_STREQ(s, "bar");
assert_se(hashmap_put_strdup(&m, "xxx", "bar") == 1);
assert_se(hashmap_put_strdup(&m, "xxx", "bar") == 0);
@@ -125,7 +125,7 @@ TEST(hashmap_put_strdup) {
assert_se(hashmap_contains(m, "xxx"));
s = hashmap_get(m, "xxx");
- assert_se(streq(s, "bar"));
+ ASSERT_STREQ(s, "bar");
}
TEST(hashmap_put_strdup_null) {
@@ -139,7 +139,7 @@ TEST(hashmap_put_strdup_null) {
assert_se(hashmap_contains(m, "foo"));
s = hashmap_get(m, "foo");
- assert_se(streq(s, "bar"));
+ ASSERT_STREQ(s, "bar");
assert_se(hashmap_put_strdup(&m, "xxx", NULL) == 1);
assert_se(hashmap_put_strdup(&m, "xxx", "bar") == -EEXIST);
@@ -147,7 +147,7 @@ TEST(hashmap_put_strdup_null) {
assert_se(hashmap_contains(m, "xxx"));
s = hashmap_get(m, "xxx");
- assert_se(s == NULL);
+ ASSERT_NULL(s);
}
/* This file tests in test-hashmap-plain.c, and tests in test-hashmap-ordered.c, which is generated