Fix a double test to actually test double, rather than float
The macro body did not use its type parameter and both uses of the macro in fact passed float for that parameter in any case, making the so-called double version of the test actually a redundant clone of the float form. This code is very ancient (harald, 2006). Pick-to: 6.9 6.8 6.5 5.15 Change-Id: Ib6b7231c2737346784385473a94f3936b08aed33 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
14d1651d15
commit
a52a979abd
@ -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)
|
||||
;
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user