summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/testlib/selftests/testlib/tst_testlib.cpp')
-rw-r--r--tests/auto/testlib/selftests/testlib/tst_testlib.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/testlib/tst_testlib.cpp b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
index 598049efdd..435c72d7ff 100644
--- a/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
+++ b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
@@ -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"));