qt5base-lts/tests/auto/testlib/selftests/expected_testlib.tap
Volker Hilsheimer 92e696b4ba Use debug stream in QTest::toString's default fallback if possible
For built-in types, this is a compile-time assert - we should not have
any types in Qt for which we have neither debug streaming nor a
QTest::toString specialization implemented. A build of most of Qt
submodules passes with this change, after minor modifications to some
tests. We cannot declare QSizeHint::Policy as a metatype after the
QMetaType has already been instantiated for it, and the QDebug stream
operator for QElaspedTimer needs to be correctly declared within the
namespace.

Add a self-test function for a custom type, and update reference files
of the self-test.

Task-number: QTBUG-104867
Pick-to: 6.4
Change-Id: I2936db5933f4589fce45f47cf2f3224ed614d8c9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-13 15:14:35 +02:00

28 lines
718 B
Plaintext

TAP version 13
# tst_TestLib
ok 1 - initTestCase()
not ok 2 - basics()
---
type: QCOMPARE
message: Compared QObject pointers are not the same
wanted: (nullptr) (nullptr)
found: tst_TestLib/"TestObject" (QTest::testObject())
expected: (nullptr) (nullptr)
actual: tst_TestLib/"TestObject" (QTest::testObject())
at: tst_TestLib::basics() (qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp:0)
file: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
line: 0
...
ok 3 - delays()
ok 4 - reals(zero)
ok 5 - reals(self-qQNaN)
ok 6 - reals(self-qInf)
ok 7 - reals(infineg)
ok 8 - reals(Sin(turn/4))
ok 9 - reals(Cos(turn/2))
ok 10 - cleanupTestCase()
1..10
# tests 10
# pass 9
# fail 1