summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp')
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index 08485e87e0..e8a6335cee 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -66,9 +66,7 @@ private slots:
void join_data() const;
void joinEmptiness() const;
-#ifdef Q_COMPILER_INITIALIZER_LISTS
void initializeList() const;
-#endif
};
extern const char email[];
@@ -296,15 +294,16 @@ void tst_QStringList::joinEmptiness() const
QVERIFY(string.isNull());
}
-// this test require C++0x support
-#ifdef Q_COMPILER_INITIALIZER_LISTS
void tst_QStringList::initializeList() const
{
+#ifdef Q_COMPILER_INITIALIZER_LISTS
QStringList v1{QLatin1String("hello"),"world",QString::fromLatin1("plop")};
QCOMPARE(v1, (QStringList() << "hello" << "world" << "plop"));
QCOMPARE(v1, (QStringList{"hello","world","plop"}));
-}
+#else
+ QSKIP("Require C++0x support, pass the right flag to the compiler");
#endif
+}
QTEST_APPLESS_MAIN(tst_QStringList)
#include "tst_qstringlist.moc"