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.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index 2c4ec62936..ef549bc660 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -72,7 +72,9 @@ private slots:
void joinChar() const;
void joinChar_data() const;
+#ifdef Q_COMPILER_INITIALIZER_LISTS
void initializeList() const;
+#endif
};
extern const char email[];
@@ -422,16 +424,16 @@ void tst_QStringList::joinEmptiness() const
QVERIFY(string.isNull());
}
+#ifdef Q_COMPILER_INITIALIZER_LISTS
+// C++0x support is required
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
}
+#endif
QTEST_APPLESS_MAIN(tst_QStringList)
#include "tst_qstringlist.moc"