From 31d5249ae1f31394d7324650aeadfe2cd1dd622c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 7 Sep 2012 11:10:28 +0200 Subject: [PATCH] QtQml tests: remove QSKIP -> wrap within !QTEST_CROSS_COMPILED guards Change-Id: I200bf6feb137e39061f144bdabd825dea70bd539 Reviewed-by: Sergio Ahumada --- tests/auto/qml/qmlmin/tst_qmlmin.cpp | 13 ++++++------- tests/auto/qml/qqmlparser/tst_qqmlparser.cpp | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/tests/auto/qml/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp index cafcf29..4feddfa 100644 --- a/tests/auto/qml/qmlmin/tst_qmlmin.cpp +++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp @@ -55,8 +55,10 @@ public: private slots: void initTestCase(); +#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void qmlMinify_data(); void qmlMinify(); +#endif private: QString qmlminPath; @@ -164,12 +166,9 @@ Examples are any .qml files under the examples/ directory that start with a lower case letter. */ +#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void tst_qmlmin::qmlMinify_data() { -#if defined(QTEST_CROSS_COMPILED) - return; -#endif - QTest::addColumn("file"); QString examples = QLatin1String(SRCDIR) + "/../../../../examples/"; @@ -182,12 +181,11 @@ void tst_qmlmin::qmlMinify_data() foreach (const QString &file, files) QTest::newRow(qPrintable(file)) << file; } +#endif +#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void tst_qmlmin::qmlMinify() { -#if defined(QTEST_CROSS_COMPILED) - QSKIP("sources not available when cross compiled"); -#endif QFETCH(QString, file); QProcess qmlminify; @@ -204,6 +202,7 @@ void tst_qmlmin::qmlMinify() else QCOMPARE(qmlminify.exitCode(), 0); } +#endif QTEST_MAIN(tst_qmlmin) diff --git a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp index cb42be9..0da8174 100644 --- a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp +++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp @@ -58,8 +58,10 @@ public: private slots: void initTestCase(); +#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void qmlParser_data(); void qmlParser(); +#endif private: QStringList excludedDirs; @@ -163,12 +165,9 @@ This test checks all the qml and js files in the QtQml UI source tree and ensures that the subnode's source locations are inside parent node's source locations */ +#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void tst_qqmlparser::qmlParser_data() { -#if defined(QTEST_CROSS_COMPILED) - return; -#endif - QTest::addColumn("file"); QString examples = QLatin1String(SRCDIR) + "/../../../../examples/"; @@ -181,12 +180,11 @@ void tst_qqmlparser::qmlParser_data() foreach (const QString &file, files) QTest::newRow(qPrintable(file)) << file; } +#endif +#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled void tst_qqmlparser::qmlParser() { -#if defined(QTEST_CROSS_COMPILED) - QSKIP("sources not available when cross compiled"); -#endif QFETCH(QString, file); using namespace QQmlJS; @@ -211,6 +209,7 @@ void tst_qqmlparser::qmlParser() check::Check chk(&engine); chk(parser.rootNode()); } +#endif QTEST_MAIN(tst_qqmlparser) -- 2.7.4