diff options
Diffstat (limited to 'tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp')
-rw-r--r-- | tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp index cd7e529f92..90e7876f97 100644 --- a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp +++ b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp @@ -41,6 +41,8 @@ private slots: void skip(); void fail(); void xfail(); + void multiSkip(); + void multiFail(); void xfailContinueSkip(); void xfailContinueFail(); void xpass(); @@ -86,6 +88,23 @@ void tst_Blacklisted::fail() QVERIFY2(false, "This test should BFAIL"); } +void tst_Blacklisted::multiFail() // cf. ../subtest/'s similar tests +{ + ++blacklisted; + for (int i = 0; i < 10; ++i) + []() { QFAIL("This failure message should be repeated ten times"); }(); + QFAIL("But this test should only contribute one to the blacklisted count"); +} + +void tst_Blacklisted::multiSkip() +{ + // Similar to multiFail() + ++skipped; + for (int i = 0; i < 10; ++i) + []() { QSKIP("This skip should be repeated ten times"); }(); + QSKIP("But this test should only contribute one to the skip count"); +} + void tst_Blacklisted::xfail() { ++blacklisted; @@ -121,7 +140,6 @@ void tst_Blacklisted::xpassContinueSkip() ++blacklisted; QEXPECT_FAIL("", "This test should BXPASS then SKIP", Continue); QVERIFY2(true, "This test should BXPASS then SKIP"); - // FIXME QTBUG-95661: skip gets counted QSKIP("This skip should be seen but not counted"); } @@ -130,7 +148,6 @@ void tst_Blacklisted::xpassContinueFail() ++blacklisted; QEXPECT_FAIL("", "This test should BXPASS then BFAIL", Continue); QVERIFY2(true, "This test should BXPASS then BFAIL"); - // FIXME QTBUG-95661: gets double-counted QFAIL("This fail should be seen and not counted (due to prior XPASS)"); } |