summaryrefslogtreecommitdiffstats
path: root/src/test/test-macro.c
diff options
context:
space:
mode:
authorIvan Kruglov <mail@ikruglov.com>2024-04-08 17:12:48 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2024-04-10 16:57:30 +0200
commit5152b8459afc6570efa537605d3bbf47c067661e (patch)
tree62f1c0477d2c39f8834059086b317d79a3484237 /src/test/test-macro.c
parentMerge pull request #32201 from aafeijoo-suse/test-minor-fixes (diff)
downloadsystemd-5152b8459afc6570efa537605d3bbf47c067661e.tar.xz
systemd-5152b8459afc6570efa537605d3bbf47c067661e.zip
ASSERT_NULL/ASSERT_NOT_NULL
Diffstat (limited to 'src/test/test-macro.c')
-rw-r--r--src/test/test-macro.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test-macro.c b/src/test/test-macro.c
index 017a20f540..6a6e7a0962 100644
--- a/src/test/test-macro.c
+++ b/src/test/test-macro.c
@@ -500,12 +500,12 @@ TEST(FOREACH_ARGUMENT) {
FOREACH_ARGUMENT(p, p_1, NULL, p_2, p_3, NULL, p_4, NULL) {
switch (i++) {
case 0: assert_se(p == p_1); break;
- case 1: assert_se(p == NULL); break;
+ case 1: ASSERT_NULL(p); break;
case 2: assert_se(p == p_2); break;
case 3: assert_se(p == p_3); break;
- case 4: assert_se(p == NULL); break;
+ case 4: ASSERT_NULL(p); break;
case 5: assert_se(p == p_4); break;
- case 6: assert_se(p == NULL); break;
+ case 6: ASSERT_NULL(p); break;
default: assert_se(false);
}
}
@@ -525,20 +525,20 @@ TEST(FOREACH_ARGUMENT) {
FOREACH_ARGUMENT(v, v_1, NULL, u32p, v_3, p_2, p_4, v_2, NULL) {
switch (i++) {
case 0: assert_se(v == v_1); break;
- case 1: assert_se(v == NULL); break;
+ case 1: ASSERT_NULL(v); break;
case 2: assert_se(v == u32p); break;
case 3: assert_se(v == v_3); break;
case 4: assert_se(v == p_2); break;
case 5: assert_se(v == p_4); break;
case 6: assert_se(v == v_2); break;
- case 7: assert_se(v == NULL); break;
+ case 7: ASSERT_NULL(v); break;
default: assert_se(false);
}
}
assert_se(i == 8);
i = 0;
FOREACH_ARGUMENT(v, NULL) {
- assert_se(v == NULL);
+ ASSERT_NULL(v);
assert_se(i++ == 0);
}
assert_se(i == 1);