summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/painting
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/gui/painting
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/gui/painting')
-rw-r--r--tests/auto/gui/painting/qcolorspace/tst_qcolorspace.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/gui/painting/qcolorspace/tst_qcolorspace.cpp b/tests/auto/gui/painting/qcolorspace/tst_qcolorspace.cpp
index 4253649e04..780c264f06 100644
--- a/tests/auto/gui/painting/qcolorspace/tst_qcolorspace.cpp
+++ b/tests/auto/gui/painting/qcolorspace/tst_qcolorspace.cpp
@@ -205,7 +205,7 @@ void tst_QColorSpace::fromIccProfile()
QFETCH(QString, description);
QFile file(testProfile);
- file.open(QIODevice::ReadOnly);
+ QVERIFY(file.open(QIODevice::ReadOnly));
QByteArray iccProfile = file.readAll();
QColorSpace fileColorSpace = QColorSpace::fromIccProfile(iccProfile);
QVERIFY(fileColorSpace.isValid());
@@ -538,8 +538,8 @@ void tst_QColorSpace::imageConversionOverNonThreeComponentMatrix_data()
QString prefix = QFINDTESTDATA("resources/");
QFile file1(prefix + "VideoHD.icc");
QFile file2(prefix + "sRGB_ICC_v4_Appearance.icc");
- file1.open(QFile::ReadOnly);
- file2.open(QFile::ReadOnly);
+ QVERIFY(file1.open(QFile::ReadOnly));
+ QVERIFY(file2.open(QFile::ReadOnly));
QByteArray iccProfile1 = file1.readAll();
QByteArray iccProfile2 = file2.readAll();
QColorSpace hdtvColorSpace = QColorSpace::fromIccProfile(iccProfile1);
@@ -772,7 +772,7 @@ void tst_QColorSpace::changePrimaries()
QFile iccFile(QFINDTESTDATA("resources/") + "VideoHD.icc");
- iccFile.open(QFile::ReadOnly);
+ QVERIFY(iccFile.open(QFile::ReadOnly));
QByteArray iccData = iccFile.readAll();
QColorSpace hdtvColorSpace = QColorSpace::fromIccProfile(iccData);
QVERIFY(hdtvColorSpace.isValid());