From 873e12c87b65fcccbe3172d9295e4db3bc60bc5f Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 22 Aug 2015 12:19:56 +0300 Subject: [PATCH] user32/tests: Fix a test failure on Win8/Win10. --- dlls/user32/tests/win.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 9f6c2244d8b..10aa545a794 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -6436,10 +6436,12 @@ static void test_layered_window(void) ret = pUpdateLayeredWindowIndirect( hwnd, &info ); ok( ret, "UpdateLayeredWindowIndirect should succeed on layered window\n" ); sz.cx--; + SetLastError(0); ret = pUpdateLayeredWindowIndirect( hwnd, &info ); ok( !ret, "UpdateLayeredWindowIndirect should fail\n" ); - ok( GetLastError() == ERROR_INCORRECT_SIZE || broken(GetLastError() == ERROR_MR_MID_NOT_FOUND), - "wrong error %u\n", GetLastError() ); + /* particular error code differs from version to version, could be ERROR_INCORRECT_SIZE, + ERROR_MR_MID_NOT_FOUND or ERROR_GEN_FAILURE (Win8/Win10) */ + ok( GetLastError() != 0, "wrong error %u\n", GetLastError() ); info.dwFlags = ULW_OPAQUE; ret = pUpdateLayeredWindowIndirect( hwnd, &info ); ok( ret, "UpdateLayeredWindowIndirect should succeed on layered window\n" );