summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index c67579967b..83a706e81d 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -2899,8 +2899,11 @@ void tst_QFile::handle()
QVERIFY(fd > 2);
QCOMPARE(int(file.handle()), fd);
char c = '\0';
- const auto readResult = QT_READ(int(file.handle()), &c, 1);
- QCOMPARE(readResult, static_cast<decltype(readResult)>(1));
+ {
+ const auto readResult = QT_READ(int(file.handle()), &c, 1);
+ decltype(readResult) expected = 1;
+ QCOMPARE(readResult, expected);
+ }
QCOMPARE(c, '/');
// test if the QFile and the handle remain in sync