From c0dd519f88a71895a1ebc0a52146a11fe0d4a17d Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Fri, 27 Jan 2012 08:26:11 +1000 Subject: 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 Reviewed-by: Jason McDonald Reviewed-by: Rohan McGovern --- tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 0fc6d0136d..1e288e2418 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -142,6 +142,7 @@ void tst_qstandardpaths::testLocateAll() setCustomLocations(); 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"))); #endif } -- cgit v1.2.3