summaryrefslogtreecommitdiff
path: root/lib/tests
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-03-19 12:15:47 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-03-19 12:15:47 +0100
commit4e4f5b4fdca7ea2a9da79fe5b0266d1d31908e1c (patch)
tree404173a9099ff08d33e9e56729c59e4858fbab79 /lib/tests
parent483d1c0a239a49fbf2384c94092c530c8de61fdc (diff)
lib/tests: More igt_subtest_group checks
... for some cases discussed with Chris on irc. We seem to get them all right. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/tests')
-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);
}