summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2012-10-16 12:15:13 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-16 20:43:37 +0200
commita530c3381b06a6e26df5f2db6b20a962d98f88ca (patch)
treec355c2d3800f61c1b3c8214138ebf0e012c00a84 /tests/auto
parentc35c913916aa9af99f530c08be297263b947e0d6 (diff)
Test: remove QSKIP in tst_QSharedPointer::lambdaCustomDeleter
Instead omit the whole test when Q_COMPILER_LAMBDA is not defined since the test is not relevant in that case. Change-Id: I541da96a881fa0c9be38ae5c0f86df047dd8fc6b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index 614c04654d..9edcb8e787 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -91,7 +91,9 @@ private slots:
#endif
void constCorrectness();
void customDeleter();
+#ifdef Q_COMPILER_LAMBDA
void lambdaCustomDeleter();
+#endif
void creating();
void creatingQObject();
void mixTrackingPointerCode();
@@ -1325,11 +1327,10 @@ void tst_QSharedPointer::customDeleter()
safetyCheck();
}
+#ifdef Q_COMPILER_LAMBDA
+// The compiler needs to be in C++11 mode and to support lambdas
void tst_QSharedPointer::lambdaCustomDeleter()
{
-#ifndef Q_COMPILER_LAMBDA
- QSKIP("This compiler is not in C++11 mode or does not support lambdas");
-#else
{
// stateless, one-argument
QSharedPointer<Data> ptr(new Data, [](Data *d) { delete d; });
@@ -1353,8 +1354,8 @@ void tst_QSharedPointer::lambdaCustomDeleter()
QCOMPARE(i, 42);
}
safetyCheck();
-#endif
}
+#endif
void customQObjectDeleterFn(QObject *obj)
{