Resurrect tests for QSharedPointer

Task-number: QTBUG-93093
Change-Id: I030c18db1ab9e48cbd3339bc2040ba0b46cd1370
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ville Voutilainen 2021-04-26 18:23:03 +03:00
parent 52077d4f01
commit e439fab4be
3 changed files with 16 additions and 3 deletions

View File

@ -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)

View File

@ -0,0 +1,11 @@
#####################################################################
## tst_qsharedpointer Test:
#####################################################################
qt_internal_add_test(tst_qsharedpointer
SOURCES
forwarddeclared.cpp
nontracked.cpp
wrapper.cpp
tst_qsharedpointer.cpp
)

View File

@ -38,7 +38,6 @@
#include <QtCore/QMap>
#include <QtCore/QThread>
#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()
{