From e439fab4be308a2a5e0beb1b3ff6eef35798b5d7 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Mon, 26 Apr 2021 18:23:03 +0300 Subject: [PATCH] Resurrect tests for QSharedPointer Task-number: QTBUG-93093 Change-Id: I030c18db1ab9e48cbd3339bc2040ba0b46cd1370 Reviewed-by: Thiago Macieira --- tests/auto/corelib/tools/CMakeLists.txt | 2 +- .../auto/corelib/tools/qsharedpointer/CMakeLists.txt | 11 +++++++++++ .../tools/qsharedpointer/tst_qsharedpointer.cpp | 6 ++++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 tests/auto/corelib/tools/qsharedpointer/CMakeLists.txt diff --git a/tests/auto/corelib/tools/CMakeLists.txt b/tests/auto/corelib/tools/CMakeLists.txt index 8fb36a956c6..a7d38892513 100644 --- a/tests/auto/corelib/tools/CMakeLists.txt +++ b/tests/auto/corelib/tools/CMakeLists.txt @@ -34,7 +34,7 @@ add_subdirectory(qscopedvaluerollback) add_subdirectory(qscopeguard) add_subdirectory(qtaggedpointer) add_subdirectory(qset) -# add_subdirectory(qsharedpointer) # special case not ported +add_subdirectory(qsharedpointer) add_subdirectory(qsize) add_subdirectory(qsizef) add_subdirectory(qstl) diff --git a/tests/auto/corelib/tools/qsharedpointer/CMakeLists.txt b/tests/auto/corelib/tools/qsharedpointer/CMakeLists.txt new file mode 100644 index 00000000000..f43b83b8194 --- /dev/null +++ b/tests/auto/corelib/tools/qsharedpointer/CMakeLists.txt @@ -0,0 +1,11 @@ +##################################################################### +## tst_qsharedpointer Test: +##################################################################### + +qt_internal_add_test(tst_qsharedpointer + SOURCES + forwarddeclared.cpp + nontracked.cpp + wrapper.cpp + tst_qsharedpointer.cpp +) diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 985564731df..42df800b148 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -38,7 +38,6 @@ #include #include -#include "externaltests.h" #include "forwarddeclared.h" #include "nontracked.h" #include "wrapper.h" @@ -112,9 +111,10 @@ private slots: void threadStressTest_data(); void threadStressTest(); void validConstructs(); +#if 0 void invalidConstructs_data(); void invalidConstructs(); - +#endif // let invalidConstructs be the last test, because it's the slowest; // add new tests above this block @@ -2125,6 +2125,7 @@ void tst_QSharedPointer::validConstructs() } } +#if 0 typedef bool (QTest::QExternalTest:: * TestFunction)(const QByteArray &body); Q_DECLARE_METATYPE(TestFunction) void tst_QSharedPointer::invalidConstructs_data() @@ -2334,6 +2335,7 @@ void tst_QSharedPointer::invalidConstructs() QFAIL("Fail"); } } +#endif // #if 0 void tst_QSharedPointer::qvariantCast() {