diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2009-04-16 09:59:31 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-04-16 09:59:31 (GMT) |
commit | 2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0 (patch) | |
tree | 4d48ece1b8ad6b5eca854d05f00eea82733af389 /tests/auto/qfile/tst_qfile.cpp | |
parent | e37684d2899b8f2cbc14fa0ab19ab12ed23d495a (diff) | |
download | Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.zip Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.tar.gz Qt-2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0.tar.bz2 |
Remove obsolete code from autotests.
Each version of Qt has its own set of autotests, therefore
preprocessor directives relating to obsolete QT_VERSION's
are not necessary.
Reviewed-by: Carlos Duclos
Diffstat (limited to 'tests/auto/qfile/tst_qfile.cpp')
-rw-r--r-- | tests/auto/qfile/tst_qfile.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp index 829e0b3..98e1859 100644 --- a/tests/auto/qfile/tst_qfile.cpp +++ b/tests/auto/qfile/tst_qfile.cpp @@ -76,10 +76,6 @@ #include "../network-settings.h" -#if QT_VERSION < 0x040200 -#define symLinkTarget readLink -#endif - Q_DECLARE_METATYPE(QFile::FileError) //TESTED_CLASS= @@ -990,12 +986,8 @@ void tst_QFile::link() #ifdef Q_OS_WIN // on windows links are always absolute QCOMPARE(info2.symLinkTarget(), info1.absoluteFilePath()); #else -#if QT_VERSION < 0x040101 - QCOMPARE(info2.symLinkTarget(), info1.filePath()); -#else QCOMPARE(info2.symLinkTarget(), info1.absoluteFilePath()); #endif -#endif #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) QString wd = getWorkingDirectoryForLink(info2.absoluteFilePath()); @@ -1061,19 +1053,12 @@ void tst_QFile::readBrokenLink() #ifdef Q_OS_WIN // on windows links are alway absolute QCOMPARE(info2.symLinkTarget(), info1.absoluteFilePath()); #else -#if QT_VERSION < 0x040101 - QCOMPARE(info2.symLinkTarget(), info1.filePath()); -#else QCOMPARE(info2.symLinkTarget(), info1.absoluteFilePath()); #endif -#endif QVERIFY(QFile::remove(info2.absoluteFilePath())); - -#if QT_VERSION >= 0x040101 QVERIFY(QFile::link("ole/..", "myLink2.lnk")); QCOMPARE(QFileInfo("myLink2.lnk").symLinkTarget(), QDir::currentPath()); -#endif } void tst_QFile::readTextFile_data() @@ -1281,10 +1266,6 @@ void tst_QFile::bufferedRead() QCOMPARE(file.pos(), qlonglong(2)); } -#if QT_VERSION <= 0x040100 - QCOMPARE(int(ftell(stdFile)), 2); -#endif - fclose(stdFile); } @@ -1604,12 +1585,7 @@ void tst_QFile::longFileName() } { QFile file(fileName); -#if QT_VERSION < 0x040100 -# ifdef Q_OS_WIN - QEXPECT_FAIL("244 chars", "Fixed in 4.1", Continue); - QEXPECT_FAIL("244 chars to absolutepath", "Fixed in 4.1", Continue); -# endif -#elif defined(Q_WS_WIN) +#if defined(Q_WS_WIN) #if !defined(Q_OS_WINCE) QT_WA({ if (false) ; }, { QEXPECT_FAIL("244 chars", "Full pathname must be less than 260 chars", Abort); @@ -1834,10 +1810,6 @@ void tst_QFile::removeOpenFile() void tst_QFile::fullDisk() { -#if QT_VERSION < 0x040102 - QSKIP("Fixed for 4.1.2", SkipAll); -#endif - QFile file("/dev/full"); if (!file.exists()) QSKIP("/dev/full doesn't exist on this system", SkipAll); @@ -1981,9 +1953,7 @@ void tst_QFile::virtualFile() // read all: data = f.readAll(); QVERIFY(f.pos() != 0); -#if QT_VERSION >= 0x040200 QVERIFY(!data.isEmpty()); -#endif // seeking QVERIFY(f.seek(1)); |