summaryrefslogtreecommitdiff
path: root/lib/tests/igt_subtest_group.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2019-02-19 08:57:12 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2019-02-20 13:58:04 +0100
commit4494052aa3c8f95c2b21acc4a1273fc4431bb71e (patch)
tree64500cbaa1b1767e0e759b2f3cf0481a656ed192 /lib/tests/igt_subtest_group.c
parent4d0d81a2176227a7432762ae095ba386f3c8aba0 (diff)
lib/tests: Add header for common helpers
Start with internal_assert, more will follow. While at it, use internal_assert everywhere (except where we check exit status, those will get dedicated assert checks). Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'lib/tests/igt_subtest_group.c')
-rw-r--r--lib/tests/igt_subtest_group.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/tests/igt_subtest_group.c b/lib/tests/igt_subtest_group.c
index c2364d79..7783d021 100644
--- a/lib/tests/igt_subtest_group.c
+++ b/lib/tests/igt_subtest_group.c
@@ -22,9 +22,10 @@
*
*/
-#include <assert.h>
#include "igt_core.h"
+#include "igt_tests_common.h"
+
igt_main
{
bool t1 = false;
@@ -41,7 +42,7 @@ igt_main
}
igt_subtest("not-run") {
- assert(0);
+ internal_assert(0);
}
igt_subtest_group {
@@ -49,35 +50,35 @@ igt_main
* restore to "run testcases" when an outer
* group is already in SKIP state. */
igt_subtest("still-not-run") {
- assert(0);
+ internal_assert(0);
}
}
}
igt_subtest("run") {
t1 = true;
- assert(1);
+ internal_assert(1);
}
}
igt_subtest_group {
igt_fixture {
- assert(t2 == 0);
+ internal_assert(t2 == 0);
t2 = 1;
}
igt_subtest("run-again") {
- assert(t2 == 1);
+ internal_assert(t2 == 1);
t2 = 2;
}
igt_fixture {
- assert(t2 == 2);
+ internal_assert(t2 == 2);
t2 = 3;
}
}
- assert(t1);
- assert(t2 == 3);
+ internal_assert(t1);
+ internal_assert(t2 == 3);
}