Skip to content

Commit

Permalink
Resurrect tests for QSharedPointer
Browse files Browse the repository at this point in the history
Task-number: QTBUG-93093
Change-Id: I030c18db1ab9e48cbd3339bc2040ba0b46cd1370
Reviewed-by: Thiago Macieira <[email protected]>
villevoutilainen committed Apr 26, 2021
1 parent 52077d4 commit e439fab
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/auto/corelib/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
11 changes: 11 additions & 0 deletions tests/auto/corelib/tools/qsharedpointer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#####################################################################
## tst_qsharedpointer Test:
#####################################################################

qt_internal_add_test(tst_qsharedpointer
SOURCES
forwarddeclared.cpp
nontracked.cpp
wrapper.cpp
tst_qsharedpointer.cpp
)
Original file line number Diff line number Diff line change
@@ -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()
{

0 comments on commit e439fab

Please sign in to comment.