Test: remove QSKIP from tst_QStringList::initializeList()
authorCaroline Chao <caroline.chao@digia.com>
Thu, 18 Oct 2012 13:57:13 +0000 (15:57 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 19 Oct 2012 07:41:36 +0000 (09:41 +0200)
Instead omit the whole test when Q_COMPILER_INITIALIZER_LISTS
is not defined.

Change-Id: I34017484a027b95a2677e1c4cb9231fa2aeb5680
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp

index 2c4ec62..ef549bc 100644 (file)
@@ -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"