From 9facf1be9b73da656557bab547aeb4148e6ff448 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 24 Sep 2015 15:56:57 +0200 Subject: Tests: Always verify whether QTemporaryDir/File creation succeeded. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/io/qstorageinfo') diff --git a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp index a7a0cf4ddb..efbcdc78e0 100644 --- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp +++ b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp @@ -153,7 +153,7 @@ void tst_QStorageInfo::storageList() void tst_QStorageInfo::tempFile() { QTemporaryFile file; - QVERIFY(file.open()); + QVERIFY2(file.open(), qPrintable(file.errorString())); QStorageInfo storage1(file.fileName()); #ifdef Q_OS_LINUX @@ -174,7 +174,7 @@ void tst_QStorageInfo::tempFile() void tst_QStorageInfo::caching() { QTemporaryFile file; - QVERIFY(file.open()); + QVERIFY2(file.open(), qPrintable(file.errorString())); QStorageInfo storage1(file.fileName()); #ifdef Q_OS_LINUX -- cgit v1.2.3