diff options
author | David Faure <faure@kde.org> | 2012-04-04 21:43:53 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-05 10:15:21 +0200 |
commit | 4a11611c8a5084acaa68e6adc4c32eda9ca672ec (patch) | |
tree | 0d21a389f0a4b1f84c4c876f71a48f1f2595288c /tests/auto/corelib/io/qstandardpaths | |
parent | b143a65728fefd8d8f748e1cf984b38e0ca5b9bc (diff) |
Fix unittest for QStandardPaths::enableTestMode
It was confusing DataLocation and GenericDataLocation, and the same
for CacheLocation and GenericCacheLocation. The test was passing in
the api_changes branch because these were giving the same result
(empty app name), but the QCoreApplication::applicationName fix in master
makes these different, so the bug in the test showed up after merging.
Change-Id: I80ef6883c96cfd02b8c277d9d686717028d396bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/io/qstandardpaths')
-rw-r--r-- | tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index a389efa5ca..ed396d3344 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -173,14 +173,14 @@ void tst_qstandardpaths::enableTestMode() // GenericDataLocation const QString dataDir = qttestDir + QLatin1String("/share"); - QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), dataDir); - const QStringList gdDirs = QStandardPaths::standardLocations(QStandardPaths::DataLocation); + QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), dataDir); + const QStringList gdDirs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); QCOMPARE(gdDirs, QStringList() << dataDir << m_globalAppDir); - // CacheLocation + // GenericCacheLocation const QString cacheDir = qttestDir + QLatin1String("/cache"); - QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::CacheLocation), cacheDir); - const QStringList cacheDirs = QStandardPaths::standardLocations(QStandardPaths::CacheLocation); + QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation), cacheDir); + const QStringList cacheDirs = QStandardPaths::standardLocations(QStandardPaths::GenericCacheLocation); QCOMPARE(cacheDirs, QStringList() << cacheDir); #endif |