Re: [3/4] Add tests for console codepages
May 8, 2007
3:58 a.m.
"Kirill K. Smirnov" <lich(a)math.spbu.ru> wrote:
+ /* Try to set invalid CP */ + ok(!SetConsoleCP(0), "Shouldn't succeed\n"); + ok(GetLastError()==ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", ERROR_INVALID_PARAMETER, GetLastError()); + ok(!SetConsoleOutputCP(0), "Shouldn't succeed\n"); + ok(GetLastError()==ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", ERROR_INVALID_PARAMETER, GetLastError());
You need to set last error value to something (usually 0xdeadbeef) before calling an API if you're planning to check last error value after the call. Also keeping code lines in a reasonable limit would be nice. -- Dmitry.
6897
Age (days ago)
6897
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov