From 9ae9d8da2798edefe50c4b351ff06ef399e1f69d Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Tue, 25 Aug 2009 12:46:44 -0500 Subject: [PATCH] oleaut32: add test for tlibattr->lcid --- dlls/oleaut32/tests/tmarshal.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index f79fbc6..94b18f8 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -1403,6 +1403,29 @@ static void test_StaticWidget(void) ITypeInfo_Release(type_info); } +static void test_libattr(void) +{ + ITypeLib *pTypeLib; + HRESULT hr; + TLIBATTR *pattr; + + hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &pTypeLib); + ok_ole_success(hr, LoadRegTypeLib); + if (FAILED(hr)) + return; + + hr = ITypeLib_GetLibAttr(pTypeLib, &pattr); + ok_ole_success(hr, GetLibAttr); + if (SUCCEEDED(hr)) + { + ok(pattr->lcid == MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), "lcid %x\n", pattr->lcid); + + ITypeLib_ReleaseTLibAttr(pTypeLib, pattr); + } + + ITypeLib_Release(pTypeLib); +} + START_TEST(tmarshal) { HRESULT hr; @@ -1415,6 +1438,7 @@ START_TEST(tmarshal) test_typelibmarshal(); test_DispCallFunc(); test_StaticWidget(); + test_libattr(); hr = UnRegisterTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32); -- 1.5.4.3