From 361b23980dcd1a0ffa85bd28543e405d07fc1475 Mon Sep 17 00:00:00 2001 From: "Cui, Dele" Date: Thu, 19 Sep 2024 15:30:10 +0800 Subject: [PATCH] Specify precision in the format flag for float4 hexadecimal output (#2064) This will ensure consistent output on any conforming implementation. Note that the specification does not define the output style when precision is missing. --------- Signed-off-by: Cui, Dele --- test_conformance/printf/util_printf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_conformance/printf/util_printf.cpp b/test_conformance/printf/util_printf.cpp index de5db5430e..d3087f2b04 100644 --- a/test_conformance/printf/util_printf.cpp +++ b/test_conformance/printf/util_printf.cpp @@ -955,7 +955,7 @@ std::vector printVectorGenParameters = { // Four component vector in hexadecimal floating point, lowercase format - { { "" }, "(0.25f,0.5f,1.f,1.5f)", "%", "a", "float", "4" }, + { { "" }, "(0.25f,0.5f,1.f,1.5f)", "%.1", "a", "float", "4" }, // Eight component vector in the shortest float representation @@ -1007,7 +1007,7 @@ std::vector correctBufferVector = { "1.23e+03,9.88e+05,5.00e-04", - "0x1p-2,0x1p-1,0x1p+0,0x1.8p+0", + "0x1.0p-2,0x1.0p-1,0x1.0p+0,0x1.8p+0", "1,2,3,4,1.5,3.14,2.5,3.5",