diff options
Diffstat (limited to 'tests/auto/corelib/io')
4 files changed, 20 insertions, 17 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 77ac4bcd86..60d1517ed3 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -181,7 +181,7 @@ private slots: void writeTextFile_data(); void writeTextFile(); /* void largeFileSupport(); */ -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) void largeUncFileSupport(); #endif void flush(); @@ -480,7 +480,7 @@ void tst_QFile::exists() file.remove(); QVERIFY(!file.exists()); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QFile unc("//" + QtNetworkSettings::winServerName() + "/testshare/readme.txt"); QVERIFY(unc.exists()); #endif @@ -605,7 +605,7 @@ void tst_QFile::size_data() QTest::addColumn<qint64>("size"); QTest::newRow( "exist01" ) << m_testFile << (qint64)245; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) // Only test UNC on Windows./ QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testshare/test.pri") << (qint64)34; #endif @@ -1539,7 +1539,7 @@ void tst_QFile::writeTextFile() QCOMPARE(file.readAll(), out); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) void tst_QFile::largeUncFileSupport() { qint64 size = Q_INT64_C(8589934592); @@ -2245,7 +2245,7 @@ void tst_QFile::writeLargeDataBlock_data() QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd; QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(QT_NO_NETWORK) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && !defined(QT_NO_NETWORK) // Some semi-randomness to avoid collisions. QTest::newRow("unc file") << QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt") @@ -2605,7 +2605,7 @@ void tst_QFile::appendAndRead() void tst_QFile::miscWithUncPathAsCurrentDir() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QString current = QDir::currentPath(); QVERIFY(QDir::setCurrent("//" + QtNetworkSettings::winServerName() + "/testshare")); QFile file("test.pri"); diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index b31b6631f4..6c147d68c8 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -378,7 +378,7 @@ void tst_QFileInfo::isRoot_data() QTest::newRow("drive 3") << "p:/" << false; #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QTest::newRow("unc 1") << "//" + QtNetworkSettings::winServerName() << true; QTest::newRow("unc 2") << "//" + QtNetworkSettings::winServerName() + "/" << true; QTest::newRow("unc 3") << "//" + QtNetworkSettings::winServerName() + "/testshare" << false; @@ -418,7 +418,7 @@ void tst_QFileInfo::exists_data() QTest::newRow("simple dir") << m_resourcesDir << true; QTest::newRow("simple dir with slash") << (m_resourcesDir + QLatin1Char('/')) << true; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QTest::newRow("unc 1") << "//" + QtNetworkSettings::winServerName() << true; QTest::newRow("unc 2") << "//" + QtNetworkSettings::winServerName() + "/" << true; QTest::newRow("unc 3") << "//" + QtNetworkSettings::winServerName() + "/testshare" << true; diff --git a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp index 4318396bd4..3064fd1320 100644 --- a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp +++ b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp @@ -172,7 +172,7 @@ private slots: QLoggingRule rule(QStringRef(&pattern), true); LoggingRuleState state = Invalid; - if (rule.flags != QLoggingRule::Invalid) { + if (rule.flags != 0) { switch (rule.pass(category, msgType)) { case -1: QFAIL("Shoudn't happen, we set pattern to true"); break; case 0: state = NoMatch; break; @@ -302,6 +302,16 @@ private slots: QVERIFY(!cat.isWarningEnabled()); } + + void QLoggingRegistry_checkErrors() + { + QLoggingSettingsParser parser; + QString warnMsg = QString("Ignoring malformed logging rule: '***=false'"); + QTest::ignoreMessage(QtWarningMsg, warnMsg.toLocal8Bit().constData()); + parser.setContent("[Rules]\n" + "***=false\n"); + QVERIFY(parser.rules().isEmpty()); + } }; QTEST_MAIN(tst_QLoggingRegistry) diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro index b9e17f7418..b7606eb3fc 100644 --- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro +++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro @@ -14,12 +14,5 @@ PRE_TARGETDEPS += $${runtime_resource.target} TESTDATA += \ parentdir.txt \ testqrc/* - -# Special case needed for runtime_resource.rcc installation, -# since it does not exist at qmake runtime. -load(testcase) # to get value of target.path -runtime_resource_install.CONFIG = no_check_exist -runtime_resource_install.files = $$OUT_PWD/$${runtime_resource.target} -runtime_resource_install.path = $${target.path} -INSTALLS += runtime_resource_install +GENERATED_TESTDATA = $${runtime_resource.target} DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 |