[3/4] Add tests for console codepages

Dmitry Timoshkov dmitry at codeweavers.com
Mon May 7 22:58:59 CDT 2007


"Kirill K. Smirnov" <lich at 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. 




More information about the wine-devel mailing list