mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
mlang/tests: Initial tests for Rfc1766ToLcid.
This commit is contained in:
parent
7317a96616
commit
7bc167ac15
2 changed files with 25 additions and 1 deletions
|
@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
|
|||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
TESTDLL = mlang.dll
|
||||
IMPORTS = oleaut32 ole32 gdi32 kernel32
|
||||
IMPORTS = mlang oleaut32 ole32 gdi32 kernel32
|
||||
|
||||
CTESTS = \
|
||||
mlang.c
|
||||
|
|
|
@ -916,6 +916,28 @@ static void test_GetLcidFromRfc1766(IMultiLanguage2 *iML2)
|
|||
|
||||
}
|
||||
|
||||
static void test_Rfc1766ToLcid(void)
|
||||
{
|
||||
LCID lcid;
|
||||
HRESULT ret;
|
||||
DWORD i;
|
||||
|
||||
for(i = 0; i < sizeof(lcid_table) / sizeof(lcid_table[0]); i++) {
|
||||
lcid = -1;
|
||||
ret = Rfc1766ToLcidA(&lcid, lcid_table[i].rfc1766);
|
||||
|
||||
ok(ret == lcid_table[i].hr,
|
||||
"#%02d: HRESULT 0x%x (expected 0x%x)\n", i, ret, lcid_table[i].hr);
|
||||
|
||||
|
||||
ok(lcid == lcid_table[i].lcid,
|
||||
"#%02d: got LCID 0x%x (expected 0x%x)\n", i, lcid, lcid_table[i].lcid);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void test_GetRfc1766FromLcid(IMultiLanguage2 *iML2)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
@ -1502,6 +1524,8 @@ START_TEST(mlang)
|
|||
return;
|
||||
|
||||
CoInitialize(NULL);
|
||||
test_Rfc1766ToLcid();
|
||||
|
||||
ret = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IMultiLanguage2, (void **)&iML2);
|
||||
if (ret != S_OK || !iML2) return;
|
||||
|
|
Loading…
Reference in a new issue