784f5d76b9
Previously, only the first B?XFAIL would be reported, all others would be discarded. Furthermore, if a B?XFAIL had happened, B?PASS was also not reported, since the B?XFAIL served as test line. However, if the B?XFAIL was followed by a SKIP, B?XPASS or B?FAIL, these were reported as normal, producing exactly the kind of duplicated test line that the skipping of B?PASS was meant to supply. So change B?XFAIL to be reported among the messages, but retain the TODO annotation of the first on the test line of a subsequent B?PASS, if nothing more drastic happens in the mean time. So now more than one B?XFAIL can be reported, the test is still marked as a TODO and we don't get duplicate test lines for a subsequent non-passing result. This replaces the bool m_wasExpectedFail member with a QTestCharBuffer m_firstExpectedFail that records the first XFAIL's TODO line (so its isEmpty() fully replaces m_wasExpectedFail). Previously, the at/file/line information for a B?XFail would be supplied as top-level keys in the YAML block for a "Pass" reported as not ok due to the XFail, as this location information is now part of the B?XFail's message in the extensions/messages block. Duplicating the first B?XFail's location at top level would add complexity and is arguably misleading, as the test result is really a pass (after ignoring known issues), and the location of the pass is indeterminate (nominally the end of the test function, but actually also after the cleanup() call for this test, when relevant), which is why a Pass has no location information. Task-number: QTBUG-96844 Change-Id: Ib3f24f56266ff49bf3bc9759ac8263ac69a62130 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
87 lines
3.8 KiB
Plaintext
87 lines
3.8 KiB
Plaintext
TAP version 13
|
|
# tst_StrCmp
|
|
ok 1 - initTestCase()
|
|
ok 2 - compareCharStars()
|
|
not ok 3 - compareByteArray()
|
|
---
|
|
type: QCOMPARE
|
|
message: Compared values are not the same
|
|
wanted: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"... (b)
|
|
found: "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"... (a)
|
|
expected: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"... (b)
|
|
actual: "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"... (a)
|
|
at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0)
|
|
file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
|
|
line: 0
|
|
extensions:
|
|
messages:
|
|
- severity: xfail
|
|
message: Next test should fail
|
|
at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0)
|
|
file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
|
|
line: 0
|
|
- severity: xfail
|
|
message: Next test should fail
|
|
at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0)
|
|
file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
|
|
line: 0
|
|
- severity: xfail
|
|
message: Next test should fail
|
|
at: tst_StrCmp::compareByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0)
|
|
file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
|
|
line: 0
|
|
...
|
|
not ok 4 - failByteArray()
|
|
---
|
|
type: QCOMPARE
|
|
message: Compared values are not the same
|
|
wanted: "cba" (QByteArray("cba"))
|
|
found: "abc" (QByteArray("abc"))
|
|
expected: "cba" (QByteArray("cba"))
|
|
actual: "abc" (QByteArray("abc"))
|
|
at: tst_StrCmp::failByteArray() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0)
|
|
file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
|
|
line: 0
|
|
...
|
|
not ok 5 - failByteArrayNull()
|
|
---
|
|
type: QCOMPARE
|
|
message: Compared values are not the same
|
|
wanted: "" (QByteArray())
|
|
found: "foo" (QByteArray("foo"))
|
|
expected: "" (QByteArray())
|
|
actual: "foo" (QByteArray("foo"))
|
|
at: tst_StrCmp::failByteArrayNull() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0)
|
|
file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
|
|
line: 0
|
|
...
|
|
not ok 6 - failByteArrayEmpty()
|
|
---
|
|
type: QCOMPARE
|
|
message: Compared values are not the same
|
|
wanted: "foo" (QByteArray("foo"))
|
|
found: "" (QByteArray(""))
|
|
expected: "foo" (QByteArray("foo"))
|
|
actual: "" (QByteArray(""))
|
|
at: tst_StrCmp::failByteArrayEmpty() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0)
|
|
file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
|
|
line: 0
|
|
...
|
|
not ok 7 - failByteArraySingleChars()
|
|
---
|
|
type: QCOMPARE
|
|
message: Compared values are not the same
|
|
wanted: "7" (QByteArray("7"))
|
|
found: "6" (QByteArray("6"))
|
|
expected: "7" (QByteArray("7"))
|
|
actual: "6" (QByteArray("6"))
|
|
at: tst_StrCmp::failByteArraySingleChars() (qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp:0)
|
|
file: qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
|
|
line: 0
|
|
...
|
|
ok 8 - cleanupTestCase()
|
|
1..8
|
|
# tests 8
|
|
# pass 3
|
|
# fail 5
|