Commit 55423d8d authored by Ge van Geldorp's avatar Ge van Geldorp Committed by Alexandre Julliard

kernel32/tests: Check last error before calling lstrcmpA() since it may reset GLE.

parent 21df49c8
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment