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>
This commit is contained in:
parent
b143a65728
commit
4a11611c8a
@ -173,14 +173,14 @@ void tst_qstandardpaths::enableTestMode()
|
|||||||
|
|
||||||
// GenericDataLocation
|
// GenericDataLocation
|
||||||
const QString dataDir = qttestDir + QLatin1String("/share");
|
const QString dataDir = qttestDir + QLatin1String("/share");
|
||||||
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), dataDir);
|
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), dataDir);
|
||||||
const QStringList gdDirs = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
|
const QStringList gdDirs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
|
||||||
QCOMPARE(gdDirs, QStringList() << dataDir << m_globalAppDir);
|
QCOMPARE(gdDirs, QStringList() << dataDir << m_globalAppDir);
|
||||||
|
|
||||||
// CacheLocation
|
// GenericCacheLocation
|
||||||
const QString cacheDir = qttestDir + QLatin1String("/cache");
|
const QString cacheDir = qttestDir + QLatin1String("/cache");
|
||||||
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::CacheLocation), cacheDir);
|
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation), cacheDir);
|
||||||
const QStringList cacheDirs = QStandardPaths::standardLocations(QStandardPaths::CacheLocation);
|
const QStringList cacheDirs = QStandardPaths::standardLocations(QStandardPaths::GenericCacheLocation);
|
||||||
QCOMPARE(cacheDirs, QStringList() << cacheDir);
|
QCOMPARE(cacheDirs, QStringList() << cacheDir);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user