From 55423d8df2051e92c05c14a6d61d0418f103164e Mon Sep 17 00:00:00 2001 From: Ge van Geldorp Date: Wed, 7 Oct 2009 16:15:34 +0200 Subject: [PATCH] kernel32/tests: Check last error before calling lstrcmpA() since it may reset GLE. --- dlls/kernel32/tests/codepage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c index 61d0c33af97..402e4bfdd35 100644 --- a/dlls/kernel32/tests/codepage.c +++ b/dlls/kernel32/tests/codepage.c @@ -131,8 +131,10 @@ static void test_negative_source_length(void) SetLastError( 0xdeadbeef ); memset(buf,'x',sizeof(buf)); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -2002, buf, 10, NULL, NULL); - ok(len == 7 && !lstrcmpA(buf, "foobar") && GetLastError() == 0xdeadbeef, + ok(len == 7 && GetLastError() == 0xdeadbeef, "WideCharToMultiByte(-2002): len=%d error=%u\n", len, GetLastError()); + ok(!lstrcmpA(buf, "foobar"), + "WideCharToMultiByte(-2002): expected \"foobar\" got \"%s\"\n", buf); SetLastError( 0xdeadbeef ); memset(bufW,'x',sizeof(bufW));