summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-24 15:56:57 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-28 15:05:43 +0000
commit9facf1be9b73da656557bab547aeb4148e6ff448 (patch)
tree3f8b5b1f4f0d8cb17a16cc4d4c9de6d2b8bab5d7 /tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
parent4accd865c24b7ed918cb705913478bab5aeb5e6e (diff)
Tests: Always verify whether QTemporaryDir/File creation succeeded.
Use QVERIFY2() with QTemporaryDir/File::errorString() consistently. Attempt to catch issues like the below warning and follow-up issues. QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa" (Access is denied.) Task-number: QTBUG-47370 Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp')
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index efb343cf85..24ff2f237f 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -56,6 +56,7 @@ class tst_qstandardpaths : public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void dump();
void testDefaultLocations();
void testCustomLocations();
@@ -128,6 +129,14 @@ static const char * const enumNames[MaxStandardLocation + 1 - int(QStandardPaths
"AppConfigLocation"
};
+void tst_qstandardpaths::initTestCase()
+{
+ QVERIFY2(m_localConfigTempDir.isValid(), qPrintable(m_localConfigTempDir.errorString()));
+ QVERIFY2(m_globalConfigTempDir.isValid(), qPrintable(m_globalConfigTempDir.errorString()));
+ QVERIFY2(m_localAppTempDir.isValid(), qPrintable(m_localAppTempDir.errorString()));
+ QVERIFY2(m_globalAppTempDir.isValid(), qPrintable(m_globalAppTempDir.errorString()));
+}
+
void tst_qstandardpaths::dump()
{
#ifdef Q_XDG_PLATFORM