From f948294f5ebbfd39ac802712aa9747d73738235b Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Thu, 18 Oct 2012 15:57:13 +0200 Subject: Test: remove QSKIP from tst_QStringList::initializeList() Instead omit the whole test when Q_COMPILER_INITIALIZER_LISTS is not defined. Change-Id: I34017484a027b95a2677e1c4cb9231fa2aeb5680 Reviewed-by: Caroline Chao --- tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/auto/corelib/tools/qstringlist') 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" -- cgit v1.2.3