mlang/tests: Return correct result in Rfc1766ToLcidA on failure.

This commit is contained in:
Detlef Riekenberg 2009-05-26 23:17:46 +02:00 committed by Alexandre Julliard
parent 7bc167ac15
commit f4def21f57
2 changed files with 9 additions and 0 deletions

View File

@ -1238,6 +1238,9 @@ HRESULT WINAPI Rfc1766ToLcidA(LCID *lcid, LPCSTR rfc1766A)
{
WCHAR rfc1766W[MAX_RFC1766_NAME + 1];
if (!rfc1766A)
return E_INVALIDARG;
MultiByteToWideChar(CP_ACP, 0, rfc1766A, -1, rfc1766W, MAX_RFC1766_NAME);
rfc1766W[MAX_RFC1766_NAME] = 0;

View File

@ -935,6 +935,12 @@ static void test_Rfc1766ToLcid(void)
}
ret = Rfc1766ToLcidA(&lcid, NULL);
ok(ret == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", ret);
ret = Rfc1766ToLcidA(NULL, "en");
ok(ret == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", ret);
}