From 7097e3c69097c4c6c6d0302bfbed992c3d2ce78e Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 11 Jun 2025 12:56:55 +0200 Subject: [PATCH] Test: don't discard result of QFile::open QVERIFY that the file could be opened, fail the test if it couldn't. Change-Id: Iab9b819e70b71fade6a58286edff8e022748d9f6 Reviewed-by: Giuseppe D'Angelo (cherry picked from commit 33dc247b6a553a5e4a6038189359d459d9019edf) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit e9a941053ff84be7d1fcfb86043d26633883d9f7) --- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index e7ab9bad401..4f0534ab177 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -1890,7 +1890,7 @@ void tst_QFileInfo::brokenShortcut() QString linkName("borkenlink.lnk"); QFile::remove(linkName); QFile file(linkName); - file.open(QFile::WriteOnly); + QVERIFY(file.open(QFile::WriteOnly)); file.write("b0rk"); file.close();