diff options
author | Edward Welbourne <[email protected]> | 2022-03-29 14:32:21 +0200 |
---|---|---|
committer | Edward Welbourne <[email protected]> | 2022-03-29 22:21:58 +0200 |
commit | ac38401d3112f2ffeca072b65e1a254a9469fe30 (patch) | |
tree | 175164781b29150b0e128919ad10b1478875c818 | |
parent | 299186602a3ad5c7cec0879170901ffcda673414 (diff) |
Move TAP's messages block to after the primary report details
In the process, split it from its comments block and don't bother with
a YAML block if it would only have contained comments.
Task-number: QTBUG-96844
Change-Id: I08c20f796252bb270ba9caa4c055cdcc0843a88b
Reviewed-by: Tor Arne Vestbø <[email protected]>
18 files changed, 126 insertions, 180 deletions
diff --git a/src/testlib/qtaptestlogger.cpp b/src/testlib/qtaptestlogger.cpp index 2bedc80a927..e0c8feddaed 100644 --- a/src/testlib/qtaptestlogger.cpp +++ b/src/testlib/qtaptestlogger.cpp @@ -166,14 +166,15 @@ void QTapTestLogger::enterTestFunction(const char *function) { m_wasExpectedFail = false; Q_ASSERT(!m_gatherMessages); - Q_ASSERT(!hasMessages()); + Q_ASSERT(m_comments.isEmpty()); + Q_ASSERT(m_messages.isEmpty()); m_gatherMessages = function != nullptr; } void QTapTestLogger::enterTestData(QTestData *data) { m_wasExpectedFail = false; - if (hasMessages()) + if (!m_messages.isEmpty() || !m_comments.isEmpty()) flushMessages(); m_gatherMessages = data != nullptr; } @@ -198,33 +199,38 @@ void QTapTestLogger::outputTestLine(bool ok, int testNumber, const QTestCharBuff void QTapTestLogger::outputBuffer(const QTestCharBuffer &buffer) { + auto isComment = [&buffer]() { + return buffer.constData()[strlen(YAML_INDENT)] == '#'; + }; if (!m_gatherMessages) outputString(buffer.constData()); - else if (buffer.constData()[strlen(YAML_INDENT)] == '#') - QTestPrivate::appendCharBuffer(&m_comments, buffer); else - QTestPrivate::appendCharBuffer(&m_messages, buffer); + QTestPrivate::appendCharBuffer(isComment() ? &m_comments : &m_messages, buffer); } void QTapTestLogger::beginYamlish() { outputString(YAML_INDENT "---\n"); +} + +void QTapTestLogger::endYamlish() +{ // Flush any accumulated messages: - if (!m_comments.isEmpty()) { - outputString(m_comments.constData()); - m_comments.clear(); - } if (!m_messages.isEmpty()) { outputString(YAML_INDENT "extensions:\n"); outputString(YAML_INDENT YAML_INDENT "messages:\n"); outputString(m_messages.constData()); m_messages.clear(); } + outputString(YAML_INDENT "...\n"); } -void QTapTestLogger::endYamlish() +void QTapTestLogger::flushComments() { - outputString(YAML_INDENT "...\n"); + if (!m_comments.isEmpty()) { + outputString(m_comments.constData()); + m_comments.clear(); + } } void QTapTestLogger::flushMessages() @@ -234,8 +240,11 @@ void QTapTestLogger::flushMessages() QTest::qt_asprintf(&dataLine, "ok %d - %s() # Data prepared\n", QTestLog::totalCount(), QTestResult::currentTestFunction()); outputString(dataLine.constData()); - beginYamlish(); - endYamlish(); + flushComments(); + if (!m_messages.isEmpty()) { + beginYamlish(); + endYamlish(); + } } void QTapTestLogger::addIncident(IncidentTypes type, const char *description, @@ -283,8 +292,9 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description, testNumber += 1; outputTestLine(ok, testNumber, directive); + flushComments(); - if (!ok || hasMessages()) { + if (!ok || !m_messages.isEmpty()) { // All failures need a diagnostics section to not confuse consumers. // We also need a diagnostics section when we have messages to report. beginYamlish(); diff --git a/src/testlib/qtaptestlogger_p.h b/src/testlib/qtaptestlogger_p.h index 99902b2f082..2650e958959 100644 --- a/src/testlib/qtaptestlogger_p.h +++ b/src/testlib/qtaptestlogger_p.h @@ -78,7 +78,7 @@ public: private: void outputTestLine(bool ok, int testNumber, const QTestCharBuffer &directive); void outputBuffer(const QTestCharBuffer &buffer); - bool hasMessages() const { return m_comments.constData()[0] || m_messages.constData()[0]; } + void flushComments(); void flushMessages(); void beginYamlish(); void endYamlish(); diff --git a/tests/auto/testlib/selftests/expected_assert.tap b/tests/auto/testlib/selftests/expected_assert.tap index 0caa60d784d..7def1706b3a 100644 --- a/tests/auto/testlib/selftests/expected_assert.tap +++ b/tests/auto/testlib/selftests/expected_assert.tap @@ -4,14 +4,14 @@ ok 1 - initTestCase() ok 2 - testNumber1() not ok 3 - testNumber2() --- - extensions: - messages: - - severity: fatal - message: ASSERT: "false" in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 0 # Received a fatal error. at: tst_Assert::testNumber2() (qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp:0) file: qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp line: 0 + extensions: + messages: + - severity: fatal + message: ASSERT: "false" in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 0 ... 1..3 # tests 3 diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.tap b/tests/auto/testlib/selftests/expected_commandlinedata.tap index 2e0705e7dd4..d623e73f401 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.tap +++ b/tests/auto/testlib/selftests/expected_commandlinedata.tap @@ -2,29 +2,17 @@ TAP version 13 # tst_DataTable ok 1 - initTestCase() ok 2 - fiveTablePasses(fiveTablePasses_data1) - --- # inform: QVERIFY(test) - ... ok 3 - fiveTablePasses(fiveTablePasses_data2) - --- # inform: QVERIFY(test) - ... ok 4 - fiveTablePasses(fiveTablePasses_data3) - --- # inform: QVERIFY(test) - ... ok 5 - fiveTablePasses(fiveTablePasses_data4) - --- # inform: QVERIFY(test) - ... ok 6 - fiveTablePasses(fiveTablePasses_data5) - --- # inform: QVERIFY(test) - ... ok 7 - fiveTablePasses(fiveTablePasses_data1) - --- # inform: QVERIFY(test) - ... ok 8 - cleanupTestCase() 1..8 # tests 8 diff --git a/tests/auto/testlib/selftests/expected_counting.tap b/tests/auto/testlib/selftests/expected_counting.tap index df395ddbc93..63f1c83fb13 100644 --- a/tests/auto/testlib/selftests/expected_counting.tap +++ b/tests/auto/testlib/selftests/expected_counting.tap @@ -97,14 +97,14 @@ ok 22 - testFailInInit(after) ok 23 - testFailInCleanup(before) not ok 24 - testFailInCleanup(fail) --- - extensions: - messages: - - severity: debug - message: This test function should execute and then QFAIL in cleanup() # Fail in cleanup() at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QFAIL in cleanup() ... ok 25 - testFailInCleanup(after) ok 26 - testSkipInInit(before) @@ -113,13 +113,13 @@ ok 28 - testSkipInInit(after) ok 29 - testSkipInCleanup(before) ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup() --- + at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) + file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp + line: 0 extensions: messages: - severity: debug message: This test function should execute and then QSKIP in cleanup() - at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) - file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp - line: 0 ... ok 31 - testSkipInCleanup(after) ok 32 - cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_expectfail.tap b/tests/auto/testlib/selftests/expected_expectfail.tap index be6169bc38b..c61f47fd480 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.tap +++ b/tests/auto/testlib/selftests/expected_expectfail.tap @@ -3,24 +3,24 @@ TAP version 13 ok 1 - initTestCase() not ok 2 - xfailAndContinue() # TODO This should xfail --- + at: tst_ExpectFail::xfailAndContinue() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 extensions: messages: - severity: debug message: begin - at: tst_ExpectFail::xfailAndContinue() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 ... # debug: after not ok 3 - xfailAndAbort() # TODO This should xfail --- + at: tst_ExpectFail::xfailAndAbort() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) + file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp + line: 0 extensions: messages: - severity: debug message: begin - at: tst_ExpectFail::xfailAndAbort() (qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp:0) - file: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp - line: 0 ... not ok 4 - xfailContinueSkip() # TODO This should xfail then skip --- @@ -147,19 +147,19 @@ not ok 27 - xfailOnAnyRow(Fail Continue) # TODO This test should xfail ... not ok 28 - xfailWithoutCheck(Fail Abort) --- + # QEXPECT_FAIL was called without any subsequent verification statements extensions: messages: - severity: debug message: Should fail (*not* xfail), despite test-case name - # QEXPECT_FAIL was called without any subsequent verification statements ... not ok 29 - xfailWithoutCheck(Fail Continue) --- + # QEXPECT_FAIL was called without any subsequent verification statements extensions: messages: - severity: debug message: Should fail (*not* xfail), despite test-case name - # QEXPECT_FAIL was called without any subsequent verification statements ... ok 30 - xpassAbort() # TODO 'true' returned TRUE unexpectedly. () ok 31 - xpassAbortSkip() # TODO 'true' returned TRUE unexpectedly. () diff --git a/tests/auto/testlib/selftests/expected_faildatatype.tap b/tests/auto/testlib/selftests/expected_faildatatype.tap index d1fe15a592c..05dcf90bca6 100644 --- a/tests/auto/testlib/selftests/expected_faildatatype.tap +++ b/tests/auto/testlib/selftests/expected_faildatatype.tap @@ -3,16 +3,16 @@ TAP version 13 ok 1 - initTestCase() not ok 2 - value() --- + # Received a fatal error. + at: tst_FailDataType::value() (qtbase/src/testlib/qtestdata.cpp:0) + file: qtbase/src/testlib/qtestdata.cpp + line: 0 extensions: messages: - severity: debug message: expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string' - severity: fatal message: ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0 - # Received a fatal error. - at: tst_FailDataType::value() (qtbase/src/testlib/qtestdata.cpp:0) - file: qtbase/src/testlib/qtestdata.cpp - line: 0 ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.tap b/tests/auto/testlib/selftests/expected_failfetchtype.tap index 74ba3d05148..465894d6bf2 100644 --- a/tests/auto/testlib/selftests/expected_failfetchtype.tap +++ b/tests/auto/testlib/selftests/expected_failfetchtype.tap @@ -3,11 +3,11 @@ TAP version 13 ok 1 - initTestCase() not ok 2 - fetch(bool) --- + # Received a fatal error. extensions: messages: - severity: fatal message: Requested type 'QString' does not match available type 'bool'. - # Received a fatal error. ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.tap b/tests/auto/testlib/selftests/expected_fetchbogus.tap index 18974928a98..2cefff9b3b2 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.tap +++ b/tests/auto/testlib/selftests/expected_fetchbogus.tap @@ -3,11 +3,11 @@ TAP version 13 ok 1 - initTestCase() not ok 2 - fetchBogus(foo) --- + # Received a fatal error. extensions: messages: - severity: fatal message: QFETCH: Requested testdata 'bubu' not available, check your _data function. - # Received a fatal error. ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_findtestdata.tap b/tests/auto/testlib/selftests/expected_findtestdata.tap index 1065d1b89bc..1f8174cce2e 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.tap +++ b/tests/auto/testlib/selftests/expected_findtestdata.tap @@ -2,9 +2,7 @@ TAP version 13 # FindTestData ok 1 - initTestCase() ok 2 - paths() - --- # warn: testdata testfile could not be located! - ... ok 3 - cleanupTestCase() 1..3 # tests 3 diff --git a/tests/auto/testlib/selftests/expected_globaldata.tap b/tests/auto/testlib/selftests/expected_globaldata.tap index 07987cf5ff7..0616682cab3 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.tap +++ b/tests/auto/testlib/selftests/expected_globaldata.tap @@ -62,46 +62,46 @@ ok 5 - testGlobal(global=true:local=true) ok 6 - skip(global=false) # SKIP skipping ok 7 - skipLocal(global=false:local=false) # SKIP skipping --- + at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 extensions: messages: - severity: debug message: init skipLocal local=false - at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) - file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp - line: 0 ... # debug: cleanup skipLocal local=false ok 8 - skipLocal(global=false:local=true) # SKIP skipping --- + at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 extensions: messages: - severity: debug message: init skipLocal local=true - at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) - file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp - line: 0 ... # debug: cleanup skipLocal local=true ok 9 - skipLocal(global=true:local=false) # SKIP skipping --- + at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 extensions: messages: - severity: debug message: init skipLocal local=false - at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) - file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp - line: 0 ... # debug: cleanup skipLocal local=false ok 10 - skipLocal(global=true:local=true) # SKIP skipping --- + at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 extensions: messages: - severity: debug message: init skipLocal local=true - at: tst_globaldata::skipLocal() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) - file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp - line: 0 ... # debug: cleanup skipLocal local=true ok 11 - skipSingle(global=false:local=false) @@ -117,24 +117,24 @@ ok 11 - skipSingle(global=false:local=false) ... ok 12 - skipSingle(global=false:local=true) # SKIP Skipping --- + at: tst_globaldata::skipSingle() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 extensions: messages: - severity: debug message: init skipSingle local=true - at: tst_globaldata::skipSingle() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) - file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp - line: 0 ... # debug: cleanup skipSingle local=true ok 13 - skipSingle(global=true:local=false) # SKIP Skipping --- + at: tst_globaldata::skipSingle() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) + file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp + line: 0 extensions: messages: - severity: debug message: init skipSingle local=false - at: tst_globaldata::skipSingle() (qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp:0) - file: qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp - line: 0 ... # debug: cleanup skipSingle local=false ok 14 - skipSingle(global=true:local=true) diff --git a/tests/auto/testlib/selftests/expected_maxwarnings.tap b/tests/auto/testlib/selftests/expected_maxwarnings.tap index c4185f29873..8c05622a89b 100644 --- a/tests/auto/testlib/selftests/expected_maxwarnings.tap +++ b/tests/auto/testlib/selftests/expected_maxwarnings.tap @@ -2,8 +2,8 @@ TAP version 13 # MaxWarnings ok 1 - initTestCase() ok 2 - warn() - --- # warn: Maximum amount of warnings exceeded. Use -maxwarnings to override. + --- extensions: messages: - severity: warning diff --git a/tests/auto/testlib/selftests/expected_signaldumper.tap b/tests/auto/testlib/selftests/expected_signaldumper.tap index 4d3a5b5f8bd..45de4ce20eb 100644 --- a/tests/auto/testlib/selftests/expected_signaldumper.tap +++ b/tests/auto/testlib/selftests/expected_signaldumper.tap @@ -2,30 +2,23 @@ TAP version 13 # tst_Signaldumper ok 1 - initTestCase() ok 2 - noConnections() - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) - ... ok 3 - oneSlot(direct) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 4 - oneSlot(queued) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 5 - oneSlotOldSyntax(direct) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () @@ -35,36 +28,28 @@ ok 5 - oneSlotOldSyntax(direct) # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 6 - oneSlotOldSyntax(queued) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 7 - twoSlots(direct) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 8 - twoSlots(queued) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 9 - twoSlotsOldSyntax(direct) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() @@ -77,18 +62,14 @@ ok 9 - twoSlotsOldSyntax(direct) # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() # inform: Slot: SignalSlotClass(_POINTER_) slotWithoutParameters() # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 10 - twoSlotsOldSyntax(queued) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 11 - signalForwarding(direct) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () @@ -98,9 +79,7 @@ ok 11 - signalForwarding(direct) # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 12 - signalForwarding(queued) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () @@ -110,9 +89,7 @@ ok 12 - signalForwarding(queued) # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () - ... ok 13 - signalForwardingOldSyntax(direct) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Slot: SignalSlotClass(_POINTER_) nestedSignal() # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () @@ -125,9 +102,7 @@ ok 13 - signalForwardingOldSyntax(direct) # inform: Slot: SignalSlotClass(_POINTER_) nestedSignal() # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 14 - signalForwardingOldSyntax(queued) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () @@ -137,34 +112,24 @@ ok 14 - signalForwardingOldSyntax(queued) # inform: Signal: SignalSlotClass(_POINTER_) signalWithParameters (int(242), char(m)) # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () - ... ok 15 - slotEmittingSignal(direct) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 16 - slotEmittingSignal(queued) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () - ... ok 17 - slotEmittingSignalOldSyntax(direct) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Slot: SignalSlotClass(_POINTER_) emitSecondSignal() # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () - ... ok 18 - slotEmittingSignalOldSyntax(queued) - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () # inform: Signal: QEventDispatcherPlatform(_POINTER_) awake () # inform: Signal: SignalSlotClass(_POINTER_) nestedSignal () - ... ok 19 - variousTypes() - --- # inform: Signal: SignalSlotClass(_POINTER_) qStringSignal (QString(Test string)) # inform: Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_) # inform: Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string)) @@ -177,11 +142,8 @@ ok 19 - variousTypes() # inform: Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QList<int>*)_POINTER_) # inform: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) # inform: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) - ... ok 20 - deletingSender() - --- # inform: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters () - ... ok 21 - cleanupTestCase() 1..21 # tests 21 diff --git a/tests/auto/testlib/selftests/expected_subtest.tap b/tests/auto/testlib/selftests/expected_subtest.tap index 93caf121cea..3430e2eebc1 100644 --- a/tests/auto/testlib/selftests/expected_subtest.tap +++ b/tests/auto/testlib/selftests/expected_subtest.tap @@ -90,12 +90,6 @@ ok 6 - test3(data0) ... not ok 7 - test3(data1) --- - extensions: - messages: - - severity: debug - message: init test3 data1 - - severity: debug - message: test3 test3 data1 type: QCOMPARE message: Compared values are not the same wanted: "hello0" (QString("hello0")) @@ -105,16 +99,16 @@ not ok 7 - test3(data1) at: tst_Subtest::test3() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp line: 0 - ... -# debug: cleanup test3 data1 -not ok 8 - test3(data2) - --- extensions: messages: - severity: debug - message: init test3 data2 + message: init test3 data1 - severity: debug - message: test3 test3 data2 + message: test3 test3 data1 + ... +# debug: cleanup test3 data1 +not ok 8 - test3(data2) + --- type: QCOMPARE message: Compared values are not the same wanted: "hello0" (QString("hello0")) @@ -124,18 +118,24 @@ not ok 8 - test3(data2) at: tst_Subtest::test3() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp line: 0 + extensions: + messages: + - severity: debug + message: init test3 data2 + - severity: debug + message: test3 test3 data2 ... # debug: cleanup test3 data2 not ok 9 - multiFail() --- - extensions: - messages: - - severity: debug - message: init multiFail (null) # This failure message should be repeated ten times at: tst_Subtest::multiFail() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp line: 0 + extensions: + messages: + - severity: debug + message: init multiFail (null) ... not ok 9 - multiFail() --- @@ -210,13 +210,13 @@ not ok 9 - multiFail() # debug: cleanup multiFail (null) ok 10 - multiSkip() # SKIP This skip should be repeated ten times --- + at: tst_Subtest::multiSkip() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) + file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp + line: 0 extensions: messages: - severity: debug message: init multiSkip (null) - at: tst_Subtest::multiSkip() (qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp:0) - file: qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp - line: 0 ... ok 10 - multiSkip() # SKIP This skip should be repeated ten times ok 10 - multiSkip() # SKIP This skip should be repeated ten times diff --git a/tests/auto/testlib/selftests/expected_verbose1.tap b/tests/auto/testlib/selftests/expected_verbose1.tap index df395ddbc93..63f1c83fb13 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.tap +++ b/tests/auto/testlib/selftests/expected_verbose1.tap @@ -97,14 +97,14 @@ ok 22 - testFailInInit(after) ok 23 - testFailInCleanup(before) not ok 24 - testFailInCleanup(fail) --- - extensions: - messages: - - severity: debug - message: This test function should execute and then QFAIL in cleanup() # Fail in cleanup() at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QFAIL in cleanup() ... ok 25 - testFailInCleanup(after) ok 26 - testSkipInInit(before) @@ -113,13 +113,13 @@ ok 28 - testSkipInInit(after) ok 29 - testSkipInCleanup(before) ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup() --- + at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) + file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp + line: 0 extensions: messages: - severity: debug message: This test function should execute and then QSKIP in cleanup() - at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) - file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp - line: 0 ... ok 31 - testSkipInCleanup(after) ok 32 - cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_verbose2.tap b/tests/auto/testlib/selftests/expected_verbose2.tap index f9b0c5b6fbe..8f7d4fac69a 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.tap +++ b/tests/auto/testlib/selftests/expected_verbose2.tap @@ -2,29 +2,21 @@ TAP version 13 # tst_Counting ok 1 - initTestCase() ok 2 - testPassPass(row 1) - --- # inform: QVERIFY(true) # inform: QCOMPARE(2 + 1, 3) - ... ok 3 - testPassPass(row 2) - --- # inform: QVERIFY(true) # inform: QCOMPARE(2 + 1, 3) - ... ok 4 - testPassSkip(row 1) - --- # inform: QVERIFY(true) # inform: QCOMPARE(2 + 1, 3) - ... ok 5 - testPassSkip(row 2) # SKIP Skipping ok 6 - testPassFail(row 1) - --- # inform: QVERIFY(true) # inform: QCOMPARE(2 + 1, 3) - ... not ok 7 - testPassFail(row 2) - --- # inform: QVERIFY(false) + --- type: QVERIFY message: Verification failed wanted: true (false) @@ -37,16 +29,14 @@ not ok 7 - testPassFail(row 2) ... ok 8 - testSkipPass(row 1) # SKIP Skipping ok 9 - testSkipPass(row 2) - --- # inform: QVERIFY(true) # inform: QCOMPARE(2 + 1, 3) - ... ok 10 - testSkipSkip(row 1) # SKIP Skipping ok 11 - testSkipSkip(row 2) # SKIP Skipping ok 12 - testSkipFail(row 1) # SKIP Skipping not ok 13 - testSkipFail(row 2) - --- # inform: QVERIFY(false) + --- type: QVERIFY message: Verification failed wanted: true (false) @@ -58,8 +48,8 @@ not ok 13 - testSkipFail(row 2) line: 0 ... not ok 14 - testFailPass(row 1) - --- # inform: QVERIFY(false) + --- type: QVERIFY message: Verification failed wanted: true (false) @@ -71,13 +61,11 @@ not ok 14 - testFailPass(row 1) line: 0 ... ok 15 - testFailPass(row 2) - --- # inform: QVERIFY(true) # inform: QCOMPARE(2 + 1, 3) - ... not ok 16 - testFailSkip(row 1) - --- # inform: QVERIFY(false) + --- type: QVERIFY message: Verification failed wanted: true (false) @@ -90,8 +78,8 @@ not ok 16 - testFailSkip(row 1) ... ok 17 - testFailSkip(row 2) # SKIP Skipping not ok 18 - testFailFail(row 1) - --- # inform: QVERIFY(false) + --- type: QVERIFY message: Verification failed wanted: true (false) @@ -103,8 +91,8 @@ not ok 18 - testFailFail(row 1) line: 0 ... not ok 19 - testFailFail(row 2) - --- # inform: QVERIFY(false) + --- type: QVERIFY message: Verification failed wanted: true (false) @@ -127,14 +115,14 @@ ok 22 - testFailInInit(after) ok 23 - testFailInCleanup(before) not ok 24 - testFailInCleanup(fail) --- - extensions: - messages: - - severity: debug - message: This test function should execute and then QFAIL in cleanup() # Fail in cleanup() at: tst_Counting::testFailInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp line: 0 + extensions: + messages: + - severity: debug + message: This test function should execute and then QFAIL in cleanup() ... ok 25 - testFailInCleanup(after) ok 26 - testSkipInInit(before) @@ -143,13 +131,13 @@ ok 28 - testSkipInInit(after) ok 29 - testSkipInCleanup(before) ok 30 - testSkipInCleanup(skip) # SKIP Skip in cleanup() --- + at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) + file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp + line: 0 extensions: messages: - severity: debug message: This test function should execute and then QSKIP in cleanup() - at: tst_Counting::testSkipInCleanup() (qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp:0) - file: qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp - line: 0 ... ok 31 - testSkipInCleanup(after) ok 32 - cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_warnings.tap b/tests/auto/testlib/selftests/expected_warnings.tap index c342ba90fd2..9ea9b46bcbd 100644 --- a/tests/auto/testlib/selftests/expected_warnings.tap +++ b/tests/auto/testlib/selftests/expected_warnings.tap @@ -27,39 +27,39 @@ ok 2 - testWarnings() message: Babablabla ... not ok 3 - testMissingWarnings() - --- # inform: Did not receive message: "Warning0" # inform: Did not receive message: "Warning1" + --- # Not all expected messages were received ... not ok 4 - testMissingWarningsRegularExpression() - --- # inform: Did not receive any message matching: "Warning\s\d" + --- # Not all expected messages were received ... not ok 5 - testMissingWarningsWithData(first row) - --- # inform: Did not receive message: "Warning0" # inform: Did not receive message: "Warning1" + --- # Not all expected messages were received ... not ok 6 - testMissingWarningsWithData(second row) - --- # inform: Did not receive message: "Warning0" # inform: Did not receive message: "Warning1" + --- # Not all expected messages were received ... not ok 7 - testFailOnWarnings() --- - extensions: - messages: - - severity: warning - message: Ran out of space! # Received a warning that resulted in a failure: Ran out of cabbage! at: tst_Warnings::testFailOnWarnings() (qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp:0) file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp line: 0 + extensions: + messages: + - severity: warning + message: Ran out of space! ... # debug: Ran out of tortillas! # info: Ran out of oil! @@ -102,30 +102,30 @@ warning1 # warning: warning3 not ok 10 - testFailOnWarningsWithData(warning2) --- - extensions: - messages: - - severity: warning - message: warning1 # Received a warning that resulted in a failure: warning2 at: tst_Warnings::testFailOnWarningsWithData() (qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp:0) file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp line: 0 + extensions: + messages: + - severity: warning + message: warning1 ... # warning: warning3 not ok 11 - testFailOnWarningsWithData(warning3) --- + # Received a warning that resulted in a failure: +warning3 + at: tst_Warnings::testFailOnWarningsWithData() (qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp:0) + file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp + line: 0 extensions: messages: - severity: warning message: warning1 - severity: warning message: warning2 - # Received a warning that resulted in a failure: -warning3 - at: tst_Warnings::testFailOnWarningsWithData() (qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp:0) - file: qtbase/tests/auto/testlib/selftests/warnings/tst_warnings.cpp - line: 0 ... not ok 12 - testFailOnWarningsFailInHelper() --- diff --git a/tests/auto/testlib/selftests/expected_watchdog.tap b/tests/auto/testlib/selftests/expected_watchdog.tap index 63ed015670b..b92777dfe5c 100644 --- a/tests/auto/testlib/selftests/expected_watchdog.tap +++ b/tests/auto/testlib/selftests/expected_watchdog.tap @@ -3,11 +3,11 @@ TAP version 13 ok 1 - initTestCase() not ok 2 - delay() --- + # Received a fatal error. extensions: messages: - severity: fatal message: Test function timed out - # Received a fatal error. ... 1..2 # tests 2 |