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>
bb10
Caroline Chao 2012-10-16 12:15:13 +02:00 committed by The Qt Project
parent c35c913916
commit a530c3381b
1 changed files with 5 additions and 4 deletions

View File

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