[PATCH 0/1] MR7471: d2d1/tests: Add broken to silence a few float comparisons in windows 7.
Test d2d1:d2d1 shows a systematic failure with the windows 7 systems: https://test.winehq.org/data/patterns.html#d2d1:d2d1 This patch adds broken statements with a little less strict float comparisons. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7471
From: Bernhard Übelacker <bernhardu(a)mailbox.org> --- dlls/d2d1/tests/d2d1.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index b2aa58d36b3..8f3b583d059 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -15174,13 +15174,17 @@ static void test_compute_geometry_area(BOOL d3d11) todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (hr == S_OK) - ok(compare_float(area, 156.9767f, 0), "Unexpected value %.8e.\n", area); + ok(compare_float(area, 156.9767f, 0) || + broken(compare_float(area, 156.9767f, 3)), /* win7 */ + "Unexpected value %.8e.\n", area); /**/ hr = ID2D1EllipseGeometry_ComputeArea(ellipse_geometry, NULL, 200.0f, &area); todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (hr == S_OK) - ok(compare_float(area, 100.0f, 0), "Unexpected value %.8e.\n", area); + ok(compare_float(area, 100.0f, 0) || + broken(compare_float(area, 100.0f, 2)), /* win7 */ + "Unexpected value %.8e.\n", area); set_matrix_identity(&matrix); scale_matrix(&matrix, 1.0f, 2.0f); @@ -15188,13 +15192,17 @@ static void test_compute_geometry_area(BOOL d3d11) todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (hr == S_OK) - ok(compare_float(area, 314.12088f, 0), "Unexpected value %.8e.\n", area); + ok(compare_float(area, 314.12088f, 0) || + broken(compare_float(area, 314.12088f, 2)), /* win7 */ + "Unexpected value %.8e.\n", area); hr = ID2D1EllipseGeometry_ComputeArea(ellipse_geometry, &matrix, 200.0f, &area); todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); if (hr == S_OK) - ok(compare_float(area, 200.0f, 0), "Unexpected value %.8e.\n", area); + ok(compare_float(area, 200.0f, 0) || + broken(compare_float(area, 200.0f, 1)), /* win7 */ + "Unexpected value %.8e.\n", area); ID2D1EllipseGeometry_Release(ellipse_geometry); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7471
I think it's fine to simply change the tolerance. You can add a comment why it is non-zero, but broken() seems too much. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7471#note_96576
participants (2)
-
Bernhard Übelacker -
Nikolay Sivov (@nsivov)