From: Bernhard Übelacker <bernhardu@mailbox.org> Co-authored-by: Hans Leidekker <hans@codeweavers.com> --- dlls/webservices/tests/writer.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/webservices/tests/writer.c b/dlls/webservices/tests/writer.c index 8e83707c3cf..f814dbdea5a 100644 --- a/dlls/webservices/tests/writer.c +++ b/dlls/webservices/tests/writer.c @@ -2222,14 +2222,13 @@ static void test_text_types(void) static void test_double(void) { - static const BOOL is_win64 = sizeof(void*) > sizeof(int); WS_XML_STRING localname = {1, (BYTE *)"t"}, ns = {0, NULL}; unsigned int fpword, fpword_orig; static const struct { double val; const char *result; - BOOL todo64; + BOOL todo; } tests[] = { @@ -2241,11 +2240,15 @@ static void test_double(void) {1.0000000000000003, "<t>1.0000000000000002</t>"}, {1.0000000000000004, "<t>1.0000000000000004</t>"}, {100000000000000, "<t>100000000000000</t>"}, + {-100000000000000, "<t>-100000000000000</t>", TRUE}, {1000000000000000, "<t>1E+15</t>"}, + {-1000000000000000, "<t>-1E+15</t>"}, {0.1, "<t>0.1</t>", TRUE}, - {0.01, "<t>1E-2</t>", TRUE}, {-0.1, "<t>-0.1</t>", TRUE}, + {0.01, "<t>1E-2</t>", TRUE}, {-0.01, "<t>-1E-2</t>", TRUE}, + {9.9, "<t>9.9</t>", TRUE}, + {-9.9, "<t>-9.9</t>", TRUE}, {1.7976931348623158e308, "<t>1.7976931348623157E+308</t>", TRUE}, {-1.7976931348623158e308, "<t>-1.7976931348623157E+308</t>", TRUE}, }; @@ -2260,6 +2263,7 @@ static void test_double(void) text.text.textType = WS_XML_TEXT_TYPE_DOUBLE; for (i = 0; i < ARRAY_SIZE( tests ); i++) { + winetest_push_context("i=%ld expected=%s", i, tests[i].result); hr = set_output( writer ); ok( hr == S_OK, "got %#lx\n", hr ); hr = WsWriteStartElement( writer, NULL, &localname, &ns, NULL ); @@ -2271,7 +2275,7 @@ static void test_double(void) hr = WsWriteEndElement( writer, NULL ); ok( hr == S_OK, "%lu: got %#lx\n", i, hr ); - if (tests[i].todo64 && is_win64) + if (tests[i].todo) { WS_BYTES bytes; ULONG size = sizeof(bytes); @@ -2281,12 +2285,13 @@ static void test_double(void) memset( &bytes, 0, sizeof(bytes) ); hr = WsGetWriterProperty( writer, WS_XML_WRITER_PROPERTY_BYTES, &bytes, size, NULL ); ok( hr == S_OK, "%lu: got %#lx\n", i, hr ); - todo_wine + todo_wine_if( bytes.length != len || memcmp( bytes.bytes, tests[i].result, len ) ) ok( bytes.length == len && !memcmp( bytes.bytes, tests[i].result, len ), "%lu: got %lu %s expected %d %s\n", i, bytes.length, debugstr_bytes(bytes.bytes, bytes.length), len, tests[i].result ); } else check_output( writer, tests[i].result, __LINE__ ); + winetest_pop_context(); } hr = set_output( writer ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11085