diff options
Diffstat (limited to 'tests/auto/corelib/io/qdir/tst_qdir.cpp')
-rw-r--r-- | tests/auto/corelib/io/qdir/tst_qdir.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index ae6fe7eaef..008293a15e 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -556,7 +556,7 @@ void tst_QDir::exists_data() char drive = 'Z'; QString driv; do { - driv = QString::fromLatin1("%1:/").arg(drive); + driv = drive + QLatin1String(":/"); if (!driveLetters.contains(driv)) break; --drive; } while (drive >= 'A'); @@ -621,7 +621,7 @@ void tst_QDir::compare() dir.makeAbsolute(); QVERIFY(dir == QDir::currentPath()); - QVERIFY(QDir() == QDir(QDir::currentPath())); + QCOMPARE(QDir(), QDir(QDir::currentPath())); QVERIFY(QDir("../") == QDir(QDir::currentPath() + "/..")); } @@ -1058,7 +1058,7 @@ void tst_QDir::current() if (!path.isEmpty()) { bool b = QDir::setCurrent(path); // If path is non existent, then setCurrent should be false (currentDir is empty in testData) - QVERIFY(b == !currentDir.isEmpty()); + QCOMPARE(b, !currentDir.isEmpty()); } if (!currentDir.isEmpty()) { QDir newCurrent = QDir::current(); @@ -1080,7 +1080,7 @@ void tst_QDir::cd_data() QTest::addColumn<bool>("successExpected"); QTest::addColumn<QString>("newDir"); - int index = m_dataPath.lastIndexOf("/"); + int index = m_dataPath.lastIndexOf(QLatin1Char('/')); QTest::newRow("cdUp") << m_dataPath << ".." << true << m_dataPath.left(index==0?1:index); QTest::newRow("cdUp non existent (relative dir)") << "anonexistingDir" << ".." << true << m_dataPath; @@ -1124,11 +1124,11 @@ void tst_QDir::setNameFilters_data() QTest::newRow("spaces2") << m_dataPath + "/testdir/spaces" << QStringList("*.bar") << QStringList("foo.bar"); QTest::newRow("spaces3") << m_dataPath + "/testdir/spaces" << QStringList("foo.*") - << QString("foo. bar,foo.bar").split(","); - QTest::newRow("files1") << m_dataPath + "/testdir/dir" << QString("*r.cpp *.pro").split(" ") - << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(","); + << QString("foo. bar,foo.bar").split(QLatin1Char(',')); + QTest::newRow("files1") << m_dataPath + "/testdir/dir" << QString("*r.cpp *.pro").split(QLatin1Char(' ')) + << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(QLatin1Char(',')); QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data") - << QString("file1.data,file2.data,file3.data").split(','); + << QString("file1.data,file2.data,file3.data").split(QLatin1Char(',')); } void tst_QDir::setNameFilters() @@ -1695,7 +1695,7 @@ void tst_QDir::searchPaths() QDir::setSearchPaths(searchPathPrefixList.at(i), searchPathsList.at(i).split(",")); } for (int i = 0; i < searchPathPrefixList.count(); ++i) { - QVERIFY(QDir::searchPaths(searchPathPrefixList.at(i)) == searchPathsList.at(i).split(",")); + QCOMPARE(QDir::searchPaths(searchPathPrefixList.at(i)), searchPathsList.at(i).split(",")); } QCOMPARE(QFile(filename).exists(), exists); @@ -1718,7 +1718,7 @@ void tst_QDir::searchPaths() } } for (int i = 0; i < searchPathPrefixList.count(); ++i) { - QVERIFY(QDir::searchPaths(searchPathPrefixList.at(i)) == searchPathsList.at(i).split(",")); + QCOMPARE(QDir::searchPaths(searchPathPrefixList.at(i)), searchPathsList.at(i).split(",")); } QCOMPARE(QFile(filename).exists(), exists); |