diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /src/test/test-set.c | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/test/test-set.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/test-set.c b/src/test/test-set.c index 0d5a6a1..23bac02 100644 --- a/src/test/test-set.c +++ b/src/test/test-set.c @@ -141,7 +141,7 @@ TEST(set_ensure_allocated) { assert_se(set_ensure_allocated(&m, &string_hash_ops) == 1); assert_se(set_ensure_allocated(&m, &string_hash_ops) == 0); assert_se(set_ensure_allocated(&m, NULL) == 0); - assert_se(set_size(m) == 0); + assert_se(set_isempty(m)); } TEST(set_copy) { @@ -231,28 +231,28 @@ TEST(set_strjoin) { /* Single entry */ assert_se(set_put_strdup(&m, "aaa") == 1); assert_se(set_strjoin(m, NULL, false, &joined) >= 0); - assert_se(streq(joined, "aaa")); + ASSERT_STREQ(joined, "aaa"); joined = mfree(joined); assert_se(set_strjoin(m, "", false, &joined) >= 0); - assert_se(streq(joined, "aaa")); + ASSERT_STREQ(joined, "aaa"); joined = mfree(joined); assert_se(set_strjoin(m, " ", false, &joined) >= 0); - assert_se(streq(joined, "aaa")); + ASSERT_STREQ(joined, "aaa"); joined = mfree(joined); assert_se(set_strjoin(m, "xxx", false, &joined) >= 0); - assert_se(streq(joined, "aaa")); + ASSERT_STREQ(joined, "aaa"); joined = mfree(joined); assert_se(set_strjoin(m, NULL, true, &joined) >= 0); - assert_se(streq(joined, "aaa")); + ASSERT_STREQ(joined, "aaa"); joined = mfree(joined); assert_se(set_strjoin(m, "", true, &joined) >= 0); - assert_se(streq(joined, "aaa")); + ASSERT_STREQ(joined, "aaa"); joined = mfree(joined); assert_se(set_strjoin(m, " ", true, &joined) >= 0); - assert_se(streq(joined, " aaa ")); + ASSERT_STREQ(joined, " aaa "); joined = mfree(joined); assert_se(set_strjoin(m, "xxx", true, &joined) >= 0); - assert_se(streq(joined, "xxxaaaxxx")); + ASSERT_STREQ(joined, "xxxaaaxxx"); /* Two entries */ assert_se(set_put_strdup(&m, "bbb") == 1); |