kernel32: Add test MultiByteToWideChar for code page is 936.

Alexandre Julliard julliard at winehq.org
Thu Feb 4 07:11:14 CST 2016


Changhui LIU <chliu027028 at gmail.com> writes:

> +static void test_cp936_to_widechar(void)
> +{
> +    int count = 0;
> +    int count2 = 0;
> +    WCHAR wide_buf[4];
> +    unsigned char buf[] = {0xbf, 0xb4, 0xc7};
> +
> +    count = MultiByteToWideChar(936, 0, (char*)&buf[0], sizeof(buf), NULL, 0);
> +    ok(count > 0, "returned %d (expected > '0')\n", count);
> +
> +    count2 = MultiByteToWideChar(936, 0, (char*)&buf[0], sizeof(buf), wide_buf, count);
> +    todo_wine ok(count2 > 0, "returned %d (expected > '0')\n", count2);
> +
> +    todo_wine ok(count == count2, "expected twice call result is same\n");

That test could be more strict, I expect that there's a defined
behavior, not just > 0. Comparing with the results from
MB_ERR_INVALID_CHARS would also be interesting.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list