summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-27 12:15:24 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-27 12:15:24 +0200
commit1ee6a08623610f222bed30d4b39af69a8cf634f7 (patch)
tree65ec2b127ecfda7a04b2916bbc91e4861285ea68 /src/test
parenttests: Remove some unnecessary quotes (diff)
downloadsystemd-1ee6a08623610f222bed30d4b39af69a8cf634f7.tar.xz
systemd-1ee6a08623610f222bed30d4b39af69a8cf634f7.zip
tests: Add ASSERT_OK_EQ()
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-macro.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-macro.c b/src/test/test-macro.c
index b56f5b86e4..69df6bc567 100644
--- a/src/test/test-macro.c
+++ b/src/test/test-macro.c
@@ -1129,6 +1129,12 @@ TEST(ASSERT) {
ASSERT_SIGNAL(ASSERT_OK_ZERO(-1), SIGABRT);
ASSERT_SIGNAL(ASSERT_OK_ZERO(-ENOANO), SIGABRT);
+ ASSERT_OK_EQ(0, 0);
+ ASSERT_SIGNAL(ASSERT_OK_EQ(1, 0), SIGABRT);
+ ASSERT_SIGNAL(ASSERT_OK_EQ(255, 5), SIGABRT);
+ ASSERT_SIGNAL(ASSERT_OK_EQ(-1, 0), SIGABRT);
+ ASSERT_SIGNAL(ASSERT_OK_EQ(-ENOANO, 0), SIGABRT);
+
ASSERT_OK_ERRNO(0 >= 0);
ASSERT_OK_ERRNO(255 >= 0);
ASSERT_OK_ERRNO(printf("Hello world\n"));