Vincent Povirk : oleaut32/tests: Add test for tlibattr->lcid.

Alexandre Julliard julliard at winehq.org
Wed Sep 2 09:31:29 CDT 2009


Module: wine
Branch: master
Commit: a9221d7688f4584f731c080b849db54895431202
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a9221d7688f4584f731c080b849db54895431202

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Tue Aug 25 12:46:44 2009 -0500

oleaut32/tests: 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 6b309fe..b73a0da 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -1399,6 +1399,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;
@@ -1411,6 +1434,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);




More information about the wine-cvs mailing list