Disable UNC tests on WinRT.

Based on file system implementation for WinRT, the UNC paths are not
supported on WinRT, so lets disable corresponding tests as well.

Change-Id: Ib45ae618f39d5da39a822160096599b30204cf71
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This commit is contained in:
Janne Anttila 2014-02-28 15:01:29 +02:00 committed by The Qt Project
parent afcaaea4c6
commit f79202805e
3 changed files with 9 additions and 9 deletions

View File

@ -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");

View File

@ -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;

View File

@ -294,7 +294,7 @@ void tst_QFileDialog2::showNameFilterDetails()
void tst_QFileDialog2::unc()
{
#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./
QString dir("\\\\" + QtNetworkSettings::winServerName() + "\\testsharewritable");
#else