diff options
Diffstat (limited to 'tests/auto/testlib/selftests/testlib/tst_testlib.cpp')
-rw-r--r-- | tests/auto/testlib/selftests/testlib/tst_testlib.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/testlib/tst_testlib.cpp b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp index 598049efdd..58e3e7ad33 100644 --- a/tests/auto/testlib/selftests/testlib/tst_testlib.cpp +++ b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2018 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <QtCore/QtMath> @@ -14,7 +14,11 @@ class tst_TestLib : public QObject { -Q_OBJECT + Q_OBJECT + +public: + tst_TestLib(); + private slots: void basics() const; void delays() const; @@ -22,6 +26,14 @@ private slots: void reals() const; }; +tst_TestLib::tst_TestLib() +{ + // Set object name, so that it's printed out when some comparison fails. + // Othewise object address will be printed, which will not allow + // tst_sefltest to compare the output with expected. + setObjectName("TestObject"); +} + void tst_TestLib::basics() const { QVERIFY(QByteArray(QTest::currentAppName()).contains("testlib")); |