kernel32/tests: Check last error before calling lstrcmpA() since it may reset GLE.
This commit is contained in:
parent
21df49c8b5
commit
55423d8df2
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue