From 4a11611c8a5084acaa68e6adc4c32eda9ca672ec Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 4 Apr 2012 21:43:53 +0200 Subject: [PATCH] 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 --- .../corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 10 +++++----- 1 file 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