summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/testlib/selftests/subtest/tst_subtest.cpp')
-rw-r--r--tests/auto/testlib/selftests/subtest/tst_subtest.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/subtest/tst_subtest.cpp b/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
index fff8d4068f..c5f5cd6c04 100644
--- a/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
+++ b/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
@@ -49,6 +49,7 @@ private slots:
void test3();
void multiFail();
+ void multiSkip();
private:
void logNames(const char *caller);
void table_data();
@@ -136,13 +137,20 @@ void tst_Subtest::test3()
void tst_Subtest::multiFail()
{
// Simulates tests which call a shared function that does common checks, or
- // that do checks in code run asynchronously from a messae loop.
+ // that do checks in code run asynchronously from a message loop.
for (int i = 0; i < 10; ++i)
[]() { QFAIL("This failure message should be repeated ten times"); }();
- // FIXME QTBUG-95661: it gets counted as eleven failures, of course.
QFAIL("But this test should only contribute one to the failure count");
}
+void tst_Subtest::multiSkip()
+{
+ // Similar to multiFail()
+ 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");
+}
+
QTEST_MAIN(tst_Subtest)
#include "tst_subtest.moc"