diff --git a/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp b/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp index 4d92071c24e..7a976b5f5eb 100644 --- a/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp +++ b/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp @@ -182,21 +182,21 @@ void tst_QColorTransform::mapRGBAFP16x4() else QVERIFY(result != testColor); - testColor = QRgbaFloat16{0.0f, 0.0f, 0.0f, 1.0f}; + testColor = QRgbaFloat16{qfloat16(0.0f), qfloat16(0.0f), qfloat16(0.0f), qfloat16(1.0f)}; result = transform.map(testColor); QCOMPARE(result, testColor); - testColor = QRgbaFloat16{1.0f, 1.0f, 1.0f, 1.0f}; + testColor = QRgbaFloat16{qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)}; result = transform.map(testColor); QCOMPARE(result, testColor); - testColor = QRgbaFloat16{1.0f, 1.0f, 0.0f, 1.0f}; + testColor = QRgbaFloat16{qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)}; result = transform.map(testColor); QCOMPARE(result.alpha(), 1.0f); if (sharesRed) QCOMPARE(result.red(), 1.0f); - testColor = QRgbaFloat16{0.0f, 1.0f, 1.0f, 1.0f}; + testColor = QRgbaFloat16{qfloat16(0.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)}; result = transform.map(testColor); // QRgbaFloat16 might overflow blue if we convert to a smaller gamut: QCOMPARE(result.blue16(), 65535); diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index 83a4d684768..8271ee6dddf 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -6814,9 +6814,9 @@ void tst_QRhi::halfPrecisionAttributes() // To avoid these errors, we pad the vertices to 8 byte stride. // static const qfloat16 vertices[] = { - -1.0, -1.0, 0.0, 0.0, - 1.0, -1.0, 0.0, 0.0, - 0.0, 1.0, 0.0, 0.0, + qfloat16(-1.0), qfloat16(-1.0), qfloat16(0.0), qfloat16(0.0), + qfloat16(1.0), qfloat16(-1.0), qfloat16(0.0), qfloat16(0.0), + qfloat16(0.0), qfloat16(1.0), qfloat16(0.0), qfloat16(0.0), }; QScopedPointer vbuf(rhi->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, sizeof(vertices)));