From: Francois Gouget Subject: [PATCH v4] gdi32/tests: MoveToEx() does not return the old point. Message-Id: Date: Thu, 28 Nov 2019 13:48:33 +0100 (CET) This behavior goes back to at least Windows XP. But Wine depends on MoveToEx() returning the old point and changing Wine does not seem necessary. So expect the documented behavior and mark the current Windows behavior as broken. Signed-off-by: Francois Gouget --- v4: Windows most likely returns the previous position on non metafile DCs so drop the MoveToEx() comment. dlls/gdi32/tests/metafile.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index ca433b33c03..84fefb305f4 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -2259,16 +2259,16 @@ 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); - */ + /* We want Wine to return the old position as per the documentation. + * But Windows since at least XP does not. + */ + ok((oldpoint.x == 2 && oldpoint.y == 2) || + 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()); -- 2.20.1