diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-09-15 10:54:36 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-09-15 13:09:01 (GMT) |
commit | 864c19e036017c32db9bf55edb38b992d2a5f962 (patch) | |
tree | eb78750e609ea4cfb0ec642ec9ec5e6c367e7f74 /tests/auto/qfile/tst_qfile.cpp | |
parent | 55648bc7a197367e8bacb2334339025ffbb83647 (diff) | |
download | Qt-864c19e036017c32db9bf55edb38b992d2a5f962.zip Qt-864c19e036017c32db9bf55edb38b992d2a5f962.tar.gz Qt-864c19e036017c32db9bf55edb38b992d2a5f962.tar.bz2 |
Change handle related tests in tst_qfile for symbian
Getting a posix file handle from a natively opened QFile isn't supported
so that part of the test is skipped.
Reviewed-By: joao
Diffstat (limited to 'tests/auto/qfile/tst_qfile.cpp')
-rw-r--r-- | tests/auto/qfile/tst_qfile.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp index 925bdec..2524e6e 100644 --- a/tests/auto/qfile/tst_qfile.cpp +++ b/tests/auto/qfile/tst_qfile.cpp @@ -2503,10 +2503,11 @@ void tst_QFile::standarderror() void tst_QFile::handle() { -#ifndef Q_OS_WINCE + int fd; +#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) QFile file(SRCDIR "tst_qfile.cpp"); QVERIFY(file.open(QIODevice::ReadOnly)); - int fd = int(file.handle()); + fd = int(file.handle()); QVERIFY(fd > 2); QCOMPARE(int(file.handle()), fd); char c = '\0'; @@ -2533,6 +2534,7 @@ void tst_QFile::handle() QCOMPARE(c, '*'); #endif + //test round trip of adopted stdio file handle QFile file2; FILE *fp = fopen(SRCDIR "tst_qfile.cpp", "r"); file2.open(fp, QIODevice::ReadOnly); @@ -2540,6 +2542,7 @@ void tst_QFile::handle() QCOMPARE(int(file2.handle()), int(fileno(fp))); fclose(fp); + //test round trip of adopted posix file handle #ifdef Q_OS_UNIX QFile file3; fd = QT_OPEN(SRCDIR "tst_qfile.cpp", QT_OPEN_RDONLY); @@ -2551,6 +2554,9 @@ void tst_QFile::handle() void tst_QFile::nativeHandleLeaks() { +#ifdef Q_OS_SYMBIAN + QSKIP("test assumptions invalid for symbian", SkipAll); +#else int fd1, fd2; #ifdef Q_OS_WIN @@ -2592,6 +2598,7 @@ void tst_QFile::nativeHandleLeaks() #ifdef Q_OS_WIN QCOMPARE( handle2, handle1 ); #endif +#endif } void tst_QFile::readEof_data() |