fix: test_build tap plan
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 8 Sep 2021 19:48:35 +0000 (15:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 8 Sep 2021 19:54:36 +0000 (15:54 -0400)
Change-Id: I83dc2343fe7c457a1ec0c94ed164c1365fce2bdb
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/unit/test_build.c

index 4c3392d6779e884fe5f5e08d49b0060bef6ed778..b2786c55c00253d8d51ab6e1ae8ed90329755f85 100644 (file)
@@ -64,10 +64,7 @@ static void test_lfstack(void)
        struct cds_lfs_stack s;
 
        cds_lfs_init(&s);
-       if (!cds_lfs_empty(&s))
-               fail("cds_lfs_empty");
-       else
-               ok(1, "cds_lfs_empty");
+       ok(cds_lfs_empty(&s), "cds_lfs_empty");
 }
 
 static void test_wfstack(void)
@@ -75,10 +72,7 @@ static void test_wfstack(void)
        struct cds_wfs_stack s;
 
        cds_wfs_init(&s);
-       if (!cds_wfs_empty(&s))
-               fail("cds_lfs_empty");
-       else
-               ok(1, "cds_lfs_empty");
+       ok(cds_wfs_empty(&s), "cds_lfs_empty");
 }
 
 static void test_wfcqueue(void)
@@ -87,10 +81,7 @@ static void test_wfcqueue(void)
        struct cds_wfcq_tail tail;
 
        cds_wfcq_init(&head, &tail);
-       if (!cds_wfcq_empty(&head, &tail))
-               fail("cds_wfcq_empty");
-       else
-               ok(1, "cds_wfcq_empty");
+       ok(cds_wfcq_empty(&head, &tail), "cds_wfcq_empty");
 }
 
 static
@@ -108,9 +99,7 @@ void test_build_cds_list_head_init(void)
 
 int main(void)
 {
-       /* Need at least 1 test to make a valid TAP test plan. */
        plan_tests(3);
-       ok(1, "dummy");
 
        test_lfstack();
        test_wfstack();
This page took 0.027036 seconds and 4 git commands to generate.