This behavior goes back to at least Windows XP. Note that Wine depends on MoveToEx() returning the old point.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- dlls/gdi32/tests/metafile.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 6adafa37b82..3920b8c0c43 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -2262,16 +2262,15 @@ static void test_mf_Graphics(void) ok( ret, "MoveToEx error %d.\n", GetLastError()); ret = LineTo(hdcMetafile, 2, 2); ok( ret, "LineTo error %d.\n", GetLastError()); + oldpoint.x = oldpoint.y = 11235; ret = MoveToEx(hdcMetafile, 1, 1, &oldpoint); ok( ret, "MoveToEx error %d.\n", GetLastError()); - -/* oldpoint gets garbage under Win XP, so the following test would - * work under Wine but fails under Windows: - * - * ok((oldpoint.x == 2) && (oldpoint.y == 2), - * "MoveToEx: (x, y) = (%ld, %ld), should be (2, 2).\n", - * oldpoint.x, oldpoint.y); - */ + /* Windows 9x and older may have returned oldpoint as per the + * documentation, but it stopped doing so with Windows XP. + */ + ok(broken(oldpoint.x == 11235 && oldpoint.y == 11235), + "MoveToEx: oldpoint = (%d, %d), should be (11235, 11235).\n", + oldpoint.x, oldpoint.y);
ret = Ellipse(hdcMetafile, 0, 0, 2, 2); ok( ret, "Ellipse error %d.\n", GetLastError());
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=60593
Your paranoid android.
=== debian10 (32 bit report) ===
gdi32: metafile.c:2268: Test failed: MoveToEx: oldpoint = (2, 2), should be (11235, 11235).
=== debian10 (32 bit French report) ===
gdi32: metafile.c:2268: Test failed: MoveToEx: oldpoint = (2, 2), should be (11235, 11235).
=== debian10 (32 bit Japanese:Japan report) ===
gdi32: metafile.c:2268: Test failed: MoveToEx: oldpoint = (2, 2), should be (11235, 11235).
=== debian10 (32 bit Chinese:China report) ===
gdi32: metafile.c:2268: Test failed: MoveToEx: oldpoint = (2, 2), should be (11235, 11235).
=== debian10 (32 bit WoW report) ===
gdi32: metafile.c:2268: Test failed: MoveToEx: oldpoint = (2, 2), should be (11235, 11235).
=== debian10 (64 bit WoW report) ===
gdi32: metafile.c:2268: Test failed: MoveToEx: oldpoint = (2, 2), should be (11235, 11235).
On Thu, 21 Nov 2019, Francois Gouget wrote:
This behavior goes back to at least Windows XP. Note that Wine depends on MoveToEx() returning the old point.
Whoops. I forgot to add the todo_wine(). Resending...