diff --git a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp index 1a3d161e788..13d1cf755e8 100644 --- a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp @@ -2472,7 +2472,7 @@ void tst_QTextStream::generateRealNumbersDataWrite() buffer.open(QBuffer::WriteOnly); \ QTextStream stream(&buffer); \ stream.setLocale(QLocale::c()); \ - float f = (float)number; \ + type f = type(number); \ QVERIFY(stream << f); \ stream.flush(); \ QCOMPARE(buffer.data().constData(), data.constData()); \ @@ -2484,7 +2484,7 @@ void tst_QTextStream::generateRealNumbersDataWrite() QCOMPARE(buffer.data(), dataWithSeparators); \ } IMPLEMENT_STREAM_LEFT_REAL_OPERATOR_TEST(float, float) -IMPLEMENT_STREAM_LEFT_REAL_OPERATOR_TEST(double, float) +IMPLEMENT_STREAM_LEFT_REAL_OPERATOR_TEST(double, double) ; // ------------------------------------------------------------------------------