diff options
author | Giuseppe D'Angelo <[email protected]> | 2024-03-23 20:41:57 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <[email protected]> | 2024-04-04 09:43:49 +0100 |
commit | 082634268a4bd23ff08b9a58d4537eaf800b7b84 (patch) | |
tree | a135b81a516b0b5f71f1fa87a45548cc1e196cca /tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp | |
parent | cd5d2ec701be8de32e83ee778d161de17f1400b4 (diff) |
Tests: check that QFile::open succeeds
Wrap it in QVERIFY if possible. If not possible (e.g. a function
that returns non-void, or not an autotest function) use qFatal
to abort the test.
Change-Id: Ie255024d29507e928a94e67d9af1cd436df4f1df
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp')
-rw-r--r-- | tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp index dffb883d66..4cbb7aaf47 100644 --- a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp +++ b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp @@ -447,7 +447,7 @@ void tst_qqmldirparser::parse() QFETCH(bool, designerSupported); QFile f(testFile(file)); - f.open(QIODevice::ReadOnly); + QVERIFY(f.open(QIODevice::ReadOnly)); QQmlDirParser p; p.parse(f.readAll()); |