diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-11-16 13:43:14 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-11-16 18:36:03 (GMT) |
commit | 5a9b670ef04232c7cd5017bd5e241c6ed975be6e (patch) | |
tree | f3b2f0b89ca474b2092878ed9f0762729a839c3d | |
parent | 02aca4e5a1d3e3e47a2c69a63faa772439ac92cf (diff) | |
download | Qt-5a9b670ef04232c7cd5017bd5e241c6ed975be6e.zip Qt-5a9b670ef04232c7cd5017bd5e241c6ed975be6e.tar.gz Qt-5a9b670ef04232c7cd5017bd5e241c6ed975be6e.tar.bz2 |
Test coverage - ensure tst_qfileinfo tests dir & absoluteDir functions
The existing dir test function is appropriate, now it checks the dir
functions as well as the path functions.
Reviewed-By: Prasanth Ullattil
-rw-r--r-- | tests/auto/qfileinfo/qfileinfo.pro | 1 | ||||
-rw-r--r-- | tests/auto/qfileinfo/tst_qfileinfo.cpp | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/qfileinfo/qfileinfo.pro b/tests/auto/qfileinfo/qfileinfo.pro index 101128c..fdbcd26 100644 --- a/tests/auto/qfileinfo/qfileinfo.pro +++ b/tests/auto/qfileinfo/qfileinfo.pro @@ -30,3 +30,4 @@ wince* { DEFINES += SRCDIR=\\\"$$PWD/\\\" } +contains(QT_CONFIG, qt3support): QT += qt3support diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index 07e33d3..d021df5 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -705,10 +705,19 @@ void tst_QFileInfo::dir() QFETCH(QString, expected); QFileInfo fi(file); - if (absPath) + if (absPath) { QCOMPARE(fi.absolutePath(), expected); - else + QCOMPARE(fi.absoluteDir().path(), expected); +#ifdef QT3_SUPPORT + QCOMPARE(fi.dir(true).path(), expected); +#endif + } else { QCOMPARE(fi.path(), expected); + QCOMPARE(fi.dir().path(), expected); +#ifdef QT3_SUPPORT + QCOMPARE(fi.dir(false).path(), expected); +#endif + } } |