summaryrefslogtreecommitdiff
path: root/lib/tests/igt_subtest_group.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/igt_subtest_group.c')
-rw-r--r--lib/tests/igt_subtest_group.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/tests/igt_subtest_group.c b/lib/tests/igt_subtest_group.c
index 2b17955c..c2364d79 100644
--- a/lib/tests/igt_subtest_group.c
+++ b/lib/tests/igt_subtest_group.c
@@ -28,6 +28,7 @@
igt_main
{
bool t1 = false;
+ int t2 = 0;
igt_subtest_group {
igt_fixture {
@@ -59,5 +60,24 @@ igt_main
}
}
+ igt_subtest_group {
+ igt_fixture {
+ assert(t2 == 0);
+ t2 = 1;
+ }
+
+ igt_subtest("run-again") {
+ assert(t2 == 1);
+ t2 = 2;
+ }
+
+ igt_fixture {
+ assert(t2 == 2);
+ t2 = 3;
+
+ }
+ }
+
assert(t1);
+ assert(t2 == 3);
}