summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-03-22 18:03:13 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2024-03-27 04:24:11 +0100
commit8414a0aa2c22e2656bccc97600a59c7163d040c2 (patch)
tree27727e85cb327f074c031bccb4eb8f844d436777 /tests/auto/other
parentcccda0e62d3d70f09654bbd6681a3e79c9814c8d (diff)
Tests: check the output of QFile::open
Wrap the call in QVERIFY. tst_QTextStream::read0d0d0a was also faulty as it *never* opened the file because of a broken path. Fix it with QFINDTESTDATA. Change-Id: I61a8f83beddf098d37fda13cb3bfb4aaa4913fc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
index eeb919f546..b8014126ed 100644
--- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
@@ -347,9 +347,7 @@ void tst_QComplexText::bidiCharacterTest()
{
QString testFile = QFINDTESTDATA("data/BidiCharacterTest.txt");
QFile f(testFile);
- QVERIFY(f.exists());
-
- f.open(QIODevice::ReadOnly);
+ QVERIFY(f.open(QIODevice::ReadOnly));
int linenum = 0;
while (!f.atEnd()) {
@@ -441,9 +439,7 @@ void tst_QComplexText::bidiTest()
{
QString testFile = QFINDTESTDATA("data/BidiTest.txt");
QFile f(testFile);
- QVERIFY(f.exists());
-
- f.open(QIODevice::ReadOnly);
+ QVERIFY(f.open(QIODevice::ReadOnly));
int linenum = 0;
QList<int> resolvedLevels;