64642a4d97
Prior to this commit, the following statement in the qtestlib documentation was untrue: "If init() fails, the following testfunction will not be executed, the test will proceed to the next testfunction." If init() called QSKIP, the test function would be skipped, but if init() reported a failure, the test function would still be executed (even though doing so could be unsafe). This commit makes testlib skip a test function if init() reports a failure and enhances the selftests to cover skips and fails in both init() and cleanup(). Task-number: QTBUG-20371 Change-Id: Id1cc8464ae0b8c257ae1b74dbe9189a501f5366b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
55 lines
3.6 KiB
Plaintext
55 lines
3.6 KiB
Plaintext
********* Start testing of tst_Counting *********
|
|
Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@
|
|
PASS : tst_Counting::initTestCase()
|
|
PASS : tst_Counting::testPassPass(row 1)
|
|
PASS : tst_Counting::testPassPass(row 2)
|
|
PASS : tst_Counting::testPassSkip(row 1)
|
|
SKIP : tst_Counting::testPassSkip(row 2) Skipping
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
|
|
PASS : tst_Counting::testPassFail(row 1)
|
|
FAIL! : tst_Counting::testPassFail(row 2) 'false' returned FALSE. ()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
|
|
SKIP : tst_Counting::testSkipPass(row 1) Skipping
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
|
|
PASS : tst_Counting::testSkipPass(row 2)
|
|
SKIP : tst_Counting::testSkipSkip(row 1) Skipping
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
|
|
SKIP : tst_Counting::testSkipSkip(row 2) Skipping
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
|
|
SKIP : tst_Counting::testSkipFail(row 1) Skipping
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
|
|
FAIL! : tst_Counting::testSkipFail(row 2) 'false' returned FALSE. ()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
|
|
FAIL! : tst_Counting::testFailPass(row 1) 'false' returned FALSE. ()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
|
|
PASS : tst_Counting::testFailPass(row 2)
|
|
FAIL! : tst_Counting::testFailSkip(row 1) 'false' returned FALSE. ()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
|
|
SKIP : tst_Counting::testFailSkip(row 2) Skipping
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
|
|
FAIL! : tst_Counting::testFailFail(row 1) 'false' returned FALSE. ()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
|
|
FAIL! : tst_Counting::testFailFail(row 2) 'false' returned FALSE. ()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
|
|
PASS : tst_Counting::testFailInInit(before)
|
|
FAIL! : tst_Counting::testFailInInit(fail) Fail in init()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(233)]
|
|
PASS : tst_Counting::testFailInInit(after)
|
|
PASS : tst_Counting::testFailInCleanup(before)
|
|
QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup()
|
|
FAIL! : tst_Counting::testFailInCleanup(fail) Fail in cleanup()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(241)]
|
|
PASS : tst_Counting::testFailInCleanup(after)
|
|
PASS : tst_Counting::testSkipInInit(before)
|
|
SKIP : tst_Counting::testSkipInInit(skip) Skip in init()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(235)]
|
|
PASS : tst_Counting::testSkipInInit(after)
|
|
PASS : tst_Counting::testSkipInCleanup(before)
|
|
QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup()
|
|
SKIP : tst_Counting::testSkipInCleanup(skip) Skip in cleanup()
|
|
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(243)]
|
|
PASS : tst_Counting::testSkipInCleanup(after)
|
|
PASS : tst_Counting::cleanupTestCase()
|
|
Totals: 16 passed, 8 failed, 8 skipped
|
|
********* Finished testing of tst_Counting *********
|