Nikolay Sivov : oleaut32/tests: Some tests for QueryPathOfRegTypeLib() with activated context.

Alexandre Julliard julliard at winehq.org
Fri Aug 23 13:49:34 CDT 2013


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Aug 23 10:30:44 2013 +0400

oleaut32/tests: Some tests for QueryPathOfRegTypeLib() with activated context.

---

 dlls/oleaut32/tests/typelib.c |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index e5d61d8..5e15564 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -1234,7 +1234,7 @@ static void test_QueryPathOfRegTypeLib(DWORD arch)
 
     for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
     {
-        ret = QueryPathOfRegTypeLib(&uid, td[i].maj, td[i].min, 0, &path);
+        ret = QueryPathOfRegTypeLib(&uid, td[i].maj, td[i].min, LOCALE_NEUTRAL, &path);
         ok(ret == td[i].ret, "QueryPathOfRegTypeLib(%u.%u) returned %08x\n", td[i].maj, td[i].min, ret);
         if (ret == S_OK)
         {
@@ -4470,6 +4470,7 @@ static void test_LoadRegTypeLib(void)
     HANDLE handle;
     ITypeLib *tl;
     HRESULT hr;
+    BSTR path;
     BOOL ret;
 
     if (!pActivateActCtx)
@@ -4495,9 +4496,35 @@ static void test_LoadRegTypeLib(void)
     hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl);
     ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr);
 
+    hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path);
+    ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr);
+
     ret = pActivateActCtx(handle, &cookie);
     ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
 
+    path = NULL;
+    hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path);
+todo_wine
+    ok(hr == S_OK, "got 0x%08x\n", hr);
+    SysFreeString(path);
+
+    path = NULL;
+    hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_en, &path);
+todo_wine
+    ok(hr == S_OK, "got 0x%08x\n", hr);
+    SysFreeString(path);
+
+    path = NULL;
+    hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_ru, &path);
+todo_wine
+    ok(hr == S_OK, "got 0x%08x\n", hr);
+    SysFreeString(path);
+
+    path = NULL;
+    hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &path);
+    ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr);
+    SysFreeString(path);
+
     /* manifest version is 2.0, actual is 1.0 */
     hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl);
     ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr);




More information about the wine-cvs mailing list