diff options
Diffstat (limited to 'tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp')
-rw-r--r-- | tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp index 73d3e0c96a..4b9f3600ac 100644 --- a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp +++ b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp @@ -57,6 +57,8 @@ private slots: void xpass() const; void dataDrivenTest_data() const; void dataDrivenTest() const; + void expectOnWrongRow_data() const; + void expectOnWrongRow() const; }; void tst_ExpectFail::expectAndContinue() const @@ -142,5 +144,19 @@ void tst_ExpectFail::dataDrivenTest() const QCOMPARE(failMode, QTest::Continue); } +void tst_ExpectFail::expectOnWrongRow_data() const +{ + QTest::addColumn<int>("dummy"); + + QTest::newRow("right row") << 0; +} + +void tst_ExpectFail::expectOnWrongRow() const +{ + // QEXPECT_FAIL for a row that is not the current row should be ignored. + QEXPECT_FAIL("wrong row", "This xfail should be ignored", Abort); + QVERIFY(true); +} + QTEST_MAIN(tst_ExpectFail) #include "tst_expectfail.moc" |