diff options
author | Andrew Knight <andrew.knight@digia.com> | 2013-09-01 19:05:46 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-02 12:36:05 +0200 |
commit | c6af0a504f2acced8147a1dd78bc249da49d3d99 (patch) | |
tree | 77355f11d9c7d03277b40b000db29a651a5df1d4 /tests/auto/corelib/tools | |
parent | c097670bf8f9c3871ca12bf9a257702f8dc4e947 (diff) |
WinRT: Fix various test compilations
- Remove irrelevant test subdirs via .pro files
- Follow WinCE codepaths where applicable
- Replace unsupported Win32 APIs with WinRT equivalents
This does not aim to fix any failures in the tests themselves; it only
makes them compile.
Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/corelib/tools')
3 files changed, 11 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp index d8965dee5d..1ee6cacd97 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp @@ -546,6 +546,9 @@ void tst_QCommandLineParser::testHelpOption() void tst_QCommandLineParser::testQuoteEscaping() { +#ifdef QT_NO_PROCESS + QSKIP("This test requires QProcess support"); +#else QCoreApplication app(empty_argc, empty_argv); QProcess process; process.start("testhelper/qcommandlineparser_test_helper", QStringList() << @@ -561,6 +564,7 @@ void tst_QCommandLineParser::testQuoteEscaping() QVERIFY2(output.contains("KEY2=\\\"VALUE2\\\""), qPrintable(output)); QVERIFY2(output.contains("QTBUG-15379=C:\\path\\'file.ext"), qPrintable(output)); QVERIFY2(output.contains("QTBUG-30628=C:\\temp\\'file'.ext"), qPrintable(output)); +#endif // !QT_NO_PROCESS } QTEST_APPLESS_MAIN(tst_QCommandLineParser) diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index a282fcabd3..039f5cbc44 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -49,6 +49,9 @@ #ifdef Q_OS_WIN # include <windows.h> +# if defined(Q_OS_WINRT) +# define tzset() +# endif #endif class tst_QDateTime : public QObject @@ -173,7 +176,7 @@ void tst_QDateTime::init() { #if defined(Q_OS_WINCE) SetUserDefaultLCID(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); -#elif defined(Q_OS_WIN) +#elif defined(Q_OS_WIN32) SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); #endif } diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index d6dea05755..f11e632b2e 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -133,7 +133,7 @@ public: private slots: void initTestCase(); void cleanupTestCase(); -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) void windowsDefaultLocale(); #endif #ifdef Q_OS_MAC @@ -1472,7 +1472,7 @@ void tst_QLocale::macDefaultLocale() } #endif // Q_OS_MAC -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) #include <qt_windows.h> static QString getWinLocaleInfo(LCTYPE type) @@ -1526,7 +1526,7 @@ public: #endif // Q_OS_WIN -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) void tst_QLocale::windowsDefaultLocale() { RestoreLocaleHelper systemLocale; |