Fixed qstandardpaths unittest to check before using first()
- Added check to testLocateAll() to check count() before calling first(). Change-Id: I04e93c1f913972b26c517f2bbd08760f9898cc7a Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
3f36f9b650
commit
c0dd519f88
@ -142,6 +142,7 @@ void tst_qstandardpaths::testLocateAll()
|
|||||||
|
|
||||||
setCustomLocations();
|
setCustomLocations();
|
||||||
const QStringList allFiles = QStandardPaths::locateAll(QStandardPaths::ConfigLocation, "qstandardpaths.pro");
|
const QStringList allFiles = QStandardPaths::locateAll(QStandardPaths::ConfigLocation, "qstandardpaths.pro");
|
||||||
|
QVERIFY2(allFiles.count() > 0, "qstandardpaths.pro not found in config locations!");
|
||||||
QCOMPARE(allFiles.first(), QString(m_thisDir + QString::fromLatin1("/qstandardpaths.pro")));
|
QCOMPARE(allFiles.first(), QString(m_thisDir + QString::fromLatin1("/qstandardpaths.pro")));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user