From 3c4e202fe4ada03473fc29dd36d9c8f9c0c3c6d5 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 18 Mar 2019 18:30:33 +0100 Subject: Make tst_QTemporaryFile::fileTemplate() more informative on failure A QCOMPARE(..., true) isn't much use; and failure would have set the object's .errorString(), which seems like it'd be worth reporting, so use QVERIFY2() instead. Change-Id: I2f3f9379984694891de81d2ffebc696d91eec70f Reviewed-by: Friedemann Kleint Reviewed-by: Thiago Macieira --- tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index cf4ab4902d..67d8c55b04 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -215,7 +215,7 @@ void tst_QTemporaryFile::fileTemplate() if (!fileTemplate.isEmpty()) file.setFileTemplate(fileTemplate); - QCOMPARE(file.open(), true); + QVERIFY2(file.open(), qPrintable(file.errorString())); QString fileName = QFileInfo(file).fileName(); if (prefix.length()) -- cgit v1.2.3