diff options
Diffstat (limited to 'tests/auto')
19 files changed, 46 insertions, 167 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index df80f80..aba49b6 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,4 +1,5 @@ TEMPLATE=subdirs +QT_FOR_CONFIG += xmlpatterns-private SUBDIRS=\ checkxmlfiles \ cmake \ @@ -30,8 +31,7 @@ SUBDIRS=\ xmlpatternsxqts \ xmlpatternsxslts \ -load(qfeatures) -!contains(QT_DISABLED_FEATURES, xmlschema) { +qtConfig(xml-schema) { SUBDIRS += qxmlschema \ qxmlschemavalidator \ xmlpatternsschema \ diff --git a/tests/auto/checkxmlfiles/checkxmlfiles.pro b/tests/auto/checkxmlfiles/checkxmlfiles.pro index 31301b9..6f71e5b 100644 --- a/tests/auto/checkxmlfiles/checkxmlfiles.pro +++ b/tests/auto/checkxmlfiles/checkxmlfiles.pro @@ -6,17 +6,4 @@ QT = core gui testlib include (../xmlpatterns.pri) -wince*: { -QT += network -requires(!isEmpty(_QMAKE_SUPER_CACHE_)) -addFiles.files = \ - ../../../examples/xquery/globalVariables/globals.gccxml \ - ../../../../qtdoc/doc/src/diagrams/stylesheet/treeview.svg \ - ../../../../qtdoc/doc/src/diagrams/designer-manual/designer-mainwindow-actions.ui \ - ../../../../qtsql/examples/sql/masterdetail/albumdetails.xml \ - ../../../../qtbase/examples/widgets/tools/undo/undo.qrc -addFiles.path = xmlfiles -DEPLOYMENT += addFiles -} else { - DEFINES += SOURCETREE=\\\"$$absolute_path(../../..)/\\\" -} +DEFINES += SOURCETREE=\\\"$$absolute_path(../../..)/\\\" diff --git a/tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp b/tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp index 2afdaf7..625dbcc 100644 --- a/tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp +++ b/tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp @@ -83,12 +83,7 @@ void tst_CheckXMLFiles::checkXMLFiles_data() const /* We don't do HTML files currently because so many of them in 3rd party are broken. */ patterns.append(QLatin1String("*.xhtml")); -#ifndef Q_OS_WINCE - QString path = QLatin1String(SOURCETREE); -#else - QString path = QFINDTESTDATA("xmlfiles"); -#endif - QDirIterator it(path, patterns, QDir::AllEntries, QDirIterator::Subdirectories); + QDirIterator it(QLatin1String(SOURCETREE), patterns, QDir::AllEntries, QDirIterator::Subdirectories); while(it.hasNext()) { it.next(); diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index f02ed86..569069a 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -65,21 +65,22 @@ public: static bool compareReplyIMAP(QByteArray const& actual) { - QList<QByteArray> expected; + const QByteArray expected[] = { - // Mandriva; old test server - expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " ) + // Mandriva; old test server + QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " ) .append(QtNetworkSettings::serverName().toLatin1()) - .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); + .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"), - // Ubuntu 10.04; new test server - expected << QByteArray( "* OK " ) + // Ubuntu 10.04; new test server + QByteArray( "* OK " ) .append(QtNetworkSettings::serverLocalName().toLatin1()) - .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n"); + .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n"), - // Feel free to add more as needed + // Feel free to add more as needed + }; - Q_FOREACH (QByteArray const& ba, expected) { + for (const QByteArray &ba : expected) { if (ba == actual) { return true; } @@ -90,21 +91,22 @@ public: static bool compareReplyIMAPSSL(QByteArray const& actual) { - QList<QByteArray> expected; + const QByteArray expected[] = { - // Mandriva; old test server - expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " ) + // Mandriva; old test server + QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " ) .append(QtNetworkSettings::serverName().toLatin1()) - .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); + .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"), - // Ubuntu 10.04; new test server - expected << QByteArray( "* OK " ) + // Ubuntu 10.04; new test server + QByteArray( "* OK " ) .append(QtNetworkSettings::serverLocalName().toLatin1()) - .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n"); + .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n"), - // Feel free to add more as needed + // Feel free to add more as needed + }; - Q_FOREACH (QByteArray const& ba, expected) { + for (const QByteArray &ba : expected) { if (ba == actual) { return true; } @@ -115,14 +117,16 @@ public: static bool compareReplyFtp(QByteArray const& actual) { - QList<QByteArray> expected; + const QByteArray expected[] = { - // A few different vsFTPd versions. - // Feel free to add more as needed - expected << QByteArray( "220 (vsFTPd 2.0.5)\r\n221 Goodbye.\r\n" ); - expected << QByteArray( "220 (vsFTPd 2.2.2)\r\n221 Goodbye.\r\n" ); + // A few different vsFTPd versions. + // Feel free to add more as needed + QByteArray( "220 (vsFTPd 2.0.5)\r\n221 Goodbye.\r\n" ), + QByteArray( "220 (vsFTPd 2.2.2)\r\n221 Goodbye.\r\n" ), - Q_FOREACH (QByteArray const& ba, expected) { + }; + + for (const QByteArray &ba : expected) { if (ba == actual) { return true; } diff --git a/tests/auto/patternistexamples/patternistexamples.pro b/tests/auto/patternistexamples/patternistexamples.pro index dfb8ba8..f415e30 100644 --- a/tests/auto/patternistexamples/patternistexamples.pro +++ b/tests/auto/patternistexamples/patternistexamples.pro @@ -2,24 +2,7 @@ TARGET = tst_patternistexamples CONFIG += testcase SOURCES += tst_patternistexamples.cpp QT += testlib -wince*: { - snippets.files = ../../../doc/src/snippets/patternist/* - snippets.path = patternist - widgetRen.files = ../../../examples/xquery/widgetRenderer/* - widgetRen.path = widgetRenderer - globVar.files = ../../../examples/xquery/globalVariables/* - globVar.path = globalVariables - filetree.files = ../../../examples/filetree/* - filetree.path = filetree - recipes.files = ../../../examples/recipes/* - recipes.path = recipes - files.files = ../../../examples/recipes/files/* - files.path = recipes\\files - DEPLOYMENT += snippets widgetRen globVar filetree recipes files - # take care of dependency - QT += network -} else { - DEFINES += SOURCETREE=\\\"$$absolute_path(../../..)/\\\" -} +DEFINES += SOURCETREE=\\\"$$absolute_path(../../..)/\\\" + include (../xmlpatterns.pri) diff --git a/tests/auto/patternistexamples/tst_patternistexamples.cpp b/tests/auto/patternistexamples/tst_patternistexamples.cpp index 7801e20..6abeb04 100644 --- a/tests/auto/patternistexamples/tst_patternistexamples.cpp +++ b/tests/auto/patternistexamples/tst_patternistexamples.cpp @@ -68,19 +68,12 @@ private: void tst_PatternistExamples::initTestCase() { -#ifndef Q_OS_WINCE m_dirs.append(QDir(QLatin1String(SOURCETREE "src/xmlpatterns/doc/snippets/patternist/"))); m_dirs.append(QDir(QLatin1String(SOURCETREE "examples/xmlpatterns/xquery/globalVariables/"))); m_dirs.append(QDir(QLatin1String(SOURCETREE "examples/xmlpatterns/filetree/"))); m_dirs.append(QDir(QLatin1String(SOURCETREE "examples/xmlpatterns/recipes/"))); m_dirs.append(QDir(QLatin1String(SOURCETREE "examples/xmlpatterns/recipes/files/"))); -#else - m_dirs.append(QDir(QFINDTESTDATA("patternist/"))); - m_dirs.append(QDir(QFINDTESTDATA("globalVariables/"))); - m_dirs.append(QDir(QFINDTESTDATA("filetree/"))); - m_dirs.append(QDir(QFINDTESTDATA("recipes/"))); - m_dirs.append(QDir(QFINDTESTDATA("recipes/files/"))); -#endif + for(int i = 0; i < m_dirs.size(); ++i) QVERIFY(m_dirs.at(i).exists()); } @@ -149,7 +142,7 @@ void tst_PatternistExamples::checkQueries_data() const QCOMPARE(queryExamples.count(), int(XQueryFileCount)); - foreach(QString q, queryExamples) + for (const QString &q : queryExamples) QTest::newRow(q.toLocal8Bit().constData()) << q; } @@ -190,7 +183,7 @@ void tst_PatternistExamples::checkXMLFiles_data() const QCOMPARE(xmlFiles.count(), int(XMLFileCount)); - foreach(QString q, xmlFiles) + for (const QString &q : xmlFiles) QTest::newRow(q.toLocal8Bit().constData()) << q; } diff --git a/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp b/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp index 76608f4..07a702b 100644 --- a/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp +++ b/tests/auto/qabstractxmlnodemodel/LoadingModel.cpp @@ -169,7 +169,7 @@ QXmlNodeModelIndex LoadingModel::nextFromSimpleAxis(QAbstractXmlNodeModel::Simpl QVector<QXmlNodeModelIndex> LoadingModel::attributes(const QXmlNodeModelIndex &ni) const { QVector<QXmlNodeModelIndex> retval; - foreach(const Node *n, toInternal(ni)->attributes) + for (const Node *n : toInternal(ni)->attributes) retval.append(createIndex(n)); return retval; diff --git a/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro b/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro index f8b4df1..d1fe536 100644 --- a/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro +++ b/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro @@ -9,10 +9,3 @@ HEADERS += TestNodeModel.h LoadingModel.h TESTDATA = tree.xml include (../xmlpatterns.pri) - -wince*: { - addFiles.files = tree.xml - addFiles.path = . - - DEPLOYMENT += addFiles -} diff --git a/tests/auto/qxmlformatter/qxmlformatter.pro b/tests/auto/qxmlformatter/qxmlformatter.pro index 6e9e262..b464c39 100644 --- a/tests/auto/qxmlformatter/qxmlformatter.pro +++ b/tests/auto/qxmlformatter/qxmlformatter.pro @@ -6,9 +6,3 @@ SOURCES += tst_qxmlformatter.cpp TESTDATA = baselines/* input/* include (../xmlpatterns.pri) - -wince*:{ - addFiles.files = baselines input - addFiles.path = . - DEPLOYMENT += addFiles -} diff --git a/tests/auto/qxmlquery/TestFundament.cpp b/tests/auto/qxmlquery/TestFundament.cpp index d28314f..9313fa1 100644 --- a/tests/auto/qxmlquery/TestFundament.cpp +++ b/tests/auto/qxmlquery/TestFundament.cpp @@ -43,7 +43,7 @@ TestFundament::TestFundament() QString TestFundament::offset() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) /* On Windows, the executable is placed in a release/ or debug/ folder. */ return QLatin1String("../"); #elif defined(Q_OS_MAC) diff --git a/tests/auto/qxmlquery/qxmlquery.pro b/tests/auto/qxmlquery/qxmlquery.pro index 7dca9b9..1f25eda 100644 --- a/tests/auto/qxmlquery/qxmlquery.pro +++ b/tests/auto/qxmlquery/qxmlquery.pro @@ -14,13 +14,3 @@ QT += network testlib TESTDATA = data/* pushBaselines/* input.xml include (../xmlpatterns.pri) - -wince*: { - addFiles.files = pushBaselines input.xml - addFiles.path = . - - patternistFiles.files = ../xmlpatterns/queries - patternistFiles.path = ../xmlpatterns - - DEPLOYMENT += addFiles patternistFiles -} diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index c3d1e03..a7f3e8b 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -977,8 +977,8 @@ void tst_QXmlQuery::evaluateToReceiver_data() const { QTest::addColumn<QString>("inputQuery"); - foreach (QString const& query, queries()) - { + const auto queries_ = queries(); + for (QString const& query : queries_) { /* This outputs a URI specific to the environment, so we can't use it for this * particular test. */ if (query != QLatin1String("staticBaseURI.xq")) @@ -1984,13 +1984,6 @@ void tst_QXmlQuery::fnDocNetworkAccessSuccess() const || QTest::currentDataTag() == QByteArray("ftp scheme")) QVERIFY(QtNetworkSettings::verifyTestNetworkSettings()); -#if defined(Q_OS_WINCE) && !defined(_X86_) - QStringList testsToSkip; - testsToSkip << "http scheme" << "ftp scheme"; - if (testsToSkip.contains(QTest::currentDataTag())) - QSKIP("Network tests are currently unsupported on Windows CE."); -#endif - QFETCH(QUrl, uriToOpen); QFETCH(QByteArray, expectedOutput); @@ -2524,13 +2517,6 @@ void tst_QXmlQuery::setQueryQUrlSuccess() const || QTest::currentDataTag() == QByteArray("A valid query via the http scheme")) QVERIFY(QtNetworkSettings::verifyTestNetworkSettings()); -#if defined(Q_OS_WINCE) && !defined(_X86_) - QStringList testsToSkip; - testsToSkip << "A valid query via the ftp scheme" << "A valid query via the http scheme"; - if (testsToSkip.contains(QTest::currentDataTag())) - QSKIP("Network tests are currently unsupported on Windows CE."); -#endif - QFETCH(QUrl, queryURI); QFETCH(QByteArray, expectedOutput); diff --git a/tests/auto/xmlpatterns.pri b/tests/auto/xmlpatterns.pri index 96d8261..84cf72b 100644 --- a/tests/auto/xmlpatterns.pri +++ b/tests/auto/xmlpatterns.pri @@ -1,14 +1,6 @@ QT += core-private xmlpatterns xmlpatterns-private - -wince*: { - patternsdk.files = $$QT.xmlpatterns.libs/QtXmlPatternsSDK*.dll - patternsdk.path = . - basedata.files = xmlpaternsxqts/Baseline.xml - basedata.path = . - DEPLOYMENT += patternsdk - QT += network -} QT -= gui + QMAKE_RPATHLINKDIR *= $$QT.gui.libs XMLPATTERNS_SDK = QtXmlPatternsSDK diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp index e182565..294e5fc 100644 --- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp +++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp @@ -132,10 +132,6 @@ void tst_XmlPatterns::xquerySupport() if(m_dontRun) QSKIP("The command line utility is not in the path."); -#ifdef Q_OS_WINCE - QSKIP("WinCE: This test uses unsupported WinCE functionality"); -#endif - #ifndef QT_NO_PROCESS QFETCH(int, expectedExitCode); QFETCH(QByteArray, expectedQueryOutput); @@ -234,10 +230,6 @@ void tst_XmlPatterns::xquerySupport() void tst_XmlPatterns::xquerySupport_data() const { -#if defined(Q_OS_WINCE) - return; -#endif - QString path = QFINDTESTDATA("queries/"); /* Check one file for existence, to avoid possible false positives. */ @@ -876,10 +868,6 @@ void tst_XmlPatterns::xsltSupport_data() const if(m_dontRun) QSKIP("The command line utility is not in the path."); -#ifdef Q_OS_WINCE - QSKIP("WinCE: This test uses unsupported WinCE functionality"); -#endif - QString spath = QFINDTESTDATA("stylesheets/"); QString qpath = QFINDTESTDATA("queries/"); @@ -1040,7 +1028,7 @@ void tst_XmlPatterns::xsltSupport_data() const */ QString tst_XmlPatterns::filterStderr(const QString &in) { - static QList<QRegExp> irrelevant = QList<QRegExp>() + static const QList<QRegExp> irrelevant = QList<QRegExp>() // specific filenames << QRegExp(QLatin1String("file:\\/\\/.*(\\.xq|\\.gccxml|\\.xml|\\.xsl|-)(,|:)")) @@ -1048,12 +1036,12 @@ QString tst_XmlPatterns::filterStderr(const QString &in) // warning messages about old-style plugins << QRegExp(QLatin1String("Old plugin format found in lib [^\n]+\n")) << QRegExp(QLatin1String("Qt plugin loader: Compatibility plugin [^\n]+\n")) + << QRegExp(QLatin1String("Unimplemented code.\n")) ; QString out = in; - foreach (const QRegExp& rx, irrelevant) { + for (const QRegExp& rx : irrelevant) out = out.remove(rx); - } return out; } diff --git a/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro b/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro index 54aa71d..4d182d6 100644 --- a/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro +++ b/tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro @@ -19,11 +19,5 @@ INCLUDEPATH += $$(QTSRCDIR)/tests/auto/xmlpatternssdk \ ../xmlpatternsxqts \ ../xmlpatternssdk -wince* { - catalog.files = TestSuite Baseline.xml - catalog.path = . - DEPLOYMENT += catalog -} - requires(contains(QT_CONFIG,private_tests)) diff --git a/tests/auto/xmlpatternssdk/xmlpatternssdk.pro b/tests/auto/xmlpatternssdk/xmlpatternssdk.pro index 254d37b..f60672a 100644 --- a/tests/auto/xmlpatternssdk/xmlpatternssdk.pro +++ b/tests/auto/xmlpatternssdk/xmlpatternssdk.pro @@ -19,7 +19,7 @@ mac { QT += xmlpatterns xml network testlib gui DESTDIR = $$QT.xmlpatterns.libs -!wince*:DLLDESTDIR = $$QT.xmlpatterns.bins +DLLDESTDIR = $$QT.xmlpatterns.bins # syncqt doesn't copy headers in tools/ so let's manually ensure # it works with shadow builds and source builds. diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp index ee6151a..8e86dd9 100644 --- a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp +++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp @@ -88,10 +88,6 @@ void tst_XmlPatternsValidator::xsdSupport() if(m_dontRun) QSKIP("The command line utility is not in the path."); -#ifdef Q_OS_WINCE - QSKIP("WinCE: This test uses unsupported WinCE functionality"); -#endif - #ifndef QT_NO_PROCESS QFETCH(int, expectedExitCode); QFETCH(QStringList, arguments); @@ -118,10 +114,6 @@ void tst_XmlPatternsValidator::xsdSupport() void tst_XmlPatternsValidator::xsdSupport_data() const { -#ifdef Q_OS_WINCE - return; -#endif - QString path = QFINDTESTDATA("files/"); /* Check one file for existence, to avoid a flood of failures. */ diff --git a/tests/auto/xmlpatternsview/xmlpatternsview.pro b/tests/auto/xmlpatternsview/xmlpatternsview.pro index 2fd12ab..5331e33 100644 --- a/tests/auto/xmlpatternsview/xmlpatternsview.pro +++ b/tests/auto/xmlpatternsview/xmlpatternsview.pro @@ -5,9 +5,3 @@ SOURCES += tst_xmlpatternsview.cpp include (../xmlpatterns.pri) TARGET = tst_xmlpatternsview - -wince*: { - viewexe.files = $$QT.xmlpatterns.bins/xmlpatternsview.exe - viewexe.path = . - DEPLOYMENT += viewexe -} diff --git a/tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro b/tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro index f9dc1c2..ddde8a9 100644 --- a/tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro +++ b/tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro @@ -16,10 +16,4 @@ INCLUDEPATH += $$(QTSRCDIR)/tests/auto/xmlpatternssdk \ ../xmlpatternsxqts \ ../xmlpatternssdk -wince*: { - testdata.files = XSLTS Baseline.xml - testdata.path = . - DEPLOYMENT += testdata -} - requires(contains(QT_CONFIG,private_tests)) |