diff options
Diffstat (limited to 'tests/auto/testlib')
12 files changed, 19 insertions, 15 deletions
diff --git a/tests/auto/testlib/selftests/eventloop/CMakeLists.txt b/tests/auto/testlib/selftests/eventloop/CMakeLists.txt index 46b794f895..afaf766f69 100644 --- a/tests/auto/testlib/selftests/eventloop/CMakeLists.txt +++ b/tests/auto/testlib/selftests/eventloop/CMakeLists.txt @@ -1,3 +1,5 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## eventloop Binary: ##################################################################### diff --git a/tests/auto/testlib/selftests/expected_testlib.junitxml b/tests/auto/testlib/selftests/expected_testlib.junitxml index f5d3a94126..33c8bfe403 100644 --- a/tests/auto/testlib/selftests/expected_testlib.junitxml +++ b/tests/auto/testlib/selftests/expected_testlib.junitxml @@ -9,7 +9,7 @@ <testcase name="basics" classname="tst_TestLib" time="@TEST_DURATION@"> <failure type="fail" message="Compared QObject pointers are not the same"> <![CDATA[ Actual (QTest::testObject()): tst_TestLib/"TestObject" - Expected (nullptr) : (nullptr)]]> + Expected (nullptr) : "nullptr"]]> </failure> </testcase> <testcase name="delays" classname="tst_TestLib" time="@TEST_DURATION@"/> diff --git a/tests/auto/testlib/selftests/expected_testlib.lightxml b/tests/auto/testlib/selftests/expected_testlib.lightxml index cd0f96d6d4..76435eb9f0 100644 --- a/tests/auto/testlib/selftests/expected_testlib.lightxml +++ b/tests/auto/testlib/selftests/expected_testlib.lightxml @@ -11,7 +11,7 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0"> <Description><![CDATA[Compared QObject pointers are not the same Actual (QTest::testObject()): tst_TestLib/"TestObject" - Expected (nullptr) : (nullptr)]]></Description> + Expected (nullptr) : "nullptr"]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> diff --git a/tests/auto/testlib/selftests/expected_testlib.tap b/tests/auto/testlib/selftests/expected_testlib.tap index 4a6056bc77..1fa7dc77c4 100644 --- a/tests/auto/testlib/selftests/expected_testlib.tap +++ b/tests/auto/testlib/selftests/expected_testlib.tap @@ -5,9 +5,9 @@ not ok 2 - basics() --- type: QCOMPARE message: Compared QObject pointers are not the same - wanted: (nullptr) (nullptr) + wanted: "nullptr" (nullptr) found: tst_TestLib/"TestObject" (QTest::testObject()) - expected: (nullptr) (nullptr) + 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 diff --git a/tests/auto/testlib/selftests/expected_testlib.teamcity b/tests/auto/testlib/selftests/expected_testlib.teamcity index 279ef03f3f..52f7fa244c 100644 --- a/tests/auto/testlib/selftests/expected_testlib.teamcity +++ b/tests/auto/testlib/selftests/expected_testlib.teamcity @@ -2,7 +2,7 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_TestLib'] ##teamcity[testFinished name='initTestCase()' flowId='tst_TestLib'] ##teamcity[testStarted name='basics()' flowId='tst_TestLib'] -##teamcity[testFailed name='basics()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)|]' details='Compared QObject pointers are not the same|n Actual (QTest::testObject()): tst_TestLib/"TestObject"|n Expected (nullptr) : (nullptr)' flowId='tst_TestLib'] +##teamcity[testFailed name='basics()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)|]' details='Compared QObject pointers are not the same|n Actual (QTest::testObject()): tst_TestLib/"TestObject"|n Expected (nullptr) : "nullptr"' flowId='tst_TestLib'] ##teamcity[testFinished name='basics()' flowId='tst_TestLib'] ##teamcity[testStarted name='delays()' flowId='tst_TestLib'] ##teamcity[testFinished name='delays()' flowId='tst_TestLib'] diff --git a/tests/auto/testlib/selftests/expected_testlib.txt b/tests/auto/testlib/selftests/expected_testlib.txt index a0b8a275d0..4d652626e9 100644 --- a/tests/auto/testlib/selftests/expected_testlib.txt +++ b/tests/auto/testlib/selftests/expected_testlib.txt @@ -3,7 +3,7 @@ Config: Using QtTest library PASS : tst_TestLib::initTestCase() FAIL! : tst_TestLib::basics() Compared QObject pointers are not the same Actual (QTest::testObject()): tst_TestLib/"TestObject" - Expected (nullptr) : (nullptr) + Expected (nullptr) : "nullptr" Loc: [qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)] PASS : tst_TestLib::delays() PASS : tst_TestLib::reals(zero) diff --git a/tests/auto/testlib/selftests/expected_testlib.xml b/tests/auto/testlib/selftests/expected_testlib.xml index 241fd3f8d1..8b66b003d0 100644 --- a/tests/auto/testlib/selftests/expected_testlib.xml +++ b/tests/auto/testlib/selftests/expected_testlib.xml @@ -13,7 +13,7 @@ <Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0"> <Description><![CDATA[Compared QObject pointers are not the same Actual (QTest::testObject()): tst_TestLib/"TestObject" - Expected (nullptr) : (nullptr)]]></Description> + Expected (nullptr) : "nullptr"]]></Description> </Incident> <Duration msecs="0"/> </TestFunction> diff --git a/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp b/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp index cc75e7f7fb..70a7798667 100644 --- a/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp +++ b/tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp @@ -93,11 +93,13 @@ static ClassWithPointerGetter getClassForValue(int val) // various toString() overloads namespace QTest { -char *toString(const int *val) +template <> char *toString(const int *const &val) { return val ? toString(*val) : toString(nullptr); } +} // namespace QTest + char *toString(const MyClass &val) { char *msg = new char[128]; @@ -117,8 +119,6 @@ char *toString(const MyClass *val) return toString(nullptr); } -} // namespace QTest - enum MyUnregisteredEnum { MyUnregisteredEnumValue1, MyUnregisteredEnumValue2 }; class tst_ExtendedCompare : public QObject @@ -293,8 +293,6 @@ public: } }; -namespace QTest { - char *toString(const ClassWithDeferredSetter &val) { char *msg = new char[128]; @@ -302,8 +300,6 @@ char *toString(const ClassWithDeferredSetter &val) return msg; } -} // namespace QTest - void tst_ExtendedCompare::checkComparisonWithTimeout() { QFETCH_GLOBAL(QTest::ComparisonOperation, operation); diff --git a/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt index 0b582ffdc3..10805ba6f7 100644 --- a/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt +++ b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2022 The Qt Company Ltd. +# Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause ##################################################################### diff --git a/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt b/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt index 1a1417f76c..cb11a577f6 100644 --- a/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt +++ b/tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt @@ -1,3 +1,5 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## failcleanuptestcase Binary: ##################################################################### diff --git a/tests/auto/testlib/selftests/skipblacklisted/CMakeLists.txt b/tests/auto/testlib/selftests/skipblacklisted/CMakeLists.txt index cc1a2ff469..0cdcf2c063 100644 --- a/tests/auto/testlib/selftests/skipblacklisted/CMakeLists.txt +++ b/tests/auto/testlib/selftests/skipblacklisted/CMakeLists.txt @@ -1,3 +1,5 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## skipblacklisted Binary: ##################################################################### diff --git a/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt b/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt index 88aae42acd..5c531b46b5 100644 --- a/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt +++ b/tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt @@ -1,3 +1,5 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## skipcleanuptestcase Binary: ##################################################################### |