From: Guillaume Charifi Subject: [1/3] oleaut32: Add test for TLB dependencies lookup in resources Message-Id: <83234198.514989.1405977820067.JavaMail.www@wsfrf1325> Date: Fri, 11 Jul 2014 19:48:00 +0200 (CEST) Invalidates http://source.winehq.org/patches/data/105527 --- dlls/oleaut32/tests/Makefile.in  |  1 + dlls/oleaut32/tests/test_dep.idl | 44 ++++++++++++++++++++++++++++++++++++++++++++ dlls/oleaut32/tests/tmarshal.rc  |  3 +++ dlls/oleaut32/tests/typelib.c    | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+) diff --git a/dlls/oleaut32/tests/Makefile.in b/dlls/oleaut32/tests/Makefile.in index 036c63d..227f0e4 100644 --- a/dlls/oleaut32/tests/Makefile.in +++ b/dlls/oleaut32/tests/Makefile.in @@ -16,6 +16,7 @@ C_SRCS = \ RC_SRCS = tmarshal.rc IDL_SRCS = \ + test_dep.idl \ test_reg.idl \ test_tlb.idl \ tmarshal.idl diff --git a/dlls/oleaut32/tests/test_dep.idl b/dlls/oleaut32/tests/test_dep.idl new file mode 100644 index 0000000..050e96e --- /dev/null +++ b/dlls/oleaut32/tests/test_dep.idl @@ -0,0 +1,44 @@ +/* + * ITypeLib dependency test + * + * Copyright 2014 Guillaume Charifi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma makedep ident +#pragma makedep typelib + +import "oaidl.idl"; /* needed by widl */ +import "test_tlb.idl"; + +[ + uuid(e0228f26-2946-478c-b64a-93feefa50532), + version(0.0), +] +library TestDep +{ + importlib("stdole2.tlb"); + importlib("test_tlb.tlb"); + + [ + odl, + uuid(394376dd-3bb8-4804-8ccc-9559434004f3) + ] + interface ITestDep : ISimpleIface + { + HRESULT test(); + } +} diff --git a/dlls/oleaut32/tests/tmarshal.rc b/dlls/oleaut32/tests/tmarshal.rc index cbb3b18..84ce487 100644 --- a/dlls/oleaut32/tests/tmarshal.rc +++ b/dlls/oleaut32/tests/tmarshal.rc @@ -35,3 +35,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL /* @makedep: test_reg.tlb */ 3 TYPELIB test_reg.tlb + +/* @makedep: test_dep.tlb */ +4 TYPELIB test_dep.tlb diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 49057a4..0df4f41 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -36,6 +36,7 @@ #include "test_reg.h" #include "test_tlb.h" +#include "test_dep.h" #define expect_eq(expr, value, type, format) { type _ret = (expr); ok((value) == _ret, #expr " expected " format " got " format "\n", value, _ret); } #define expect_int(expr, value) expect_eq(expr, (int)(value), int, "%d") @@ -5509,6 +5510,44 @@ static void test_stub(void) CoUninitialize(); } +static void test_dep(void) { + HRESULT hr; + const char *filenameA; + WCHAR filenameW[MAX_PATH]; + ITypeLib *ptLib = NULL; + ITypeInfo *ptInfo = NULL; + ITypeInfo *ptInfoExt = NULL; + HREFTYPE refType; + + static const WCHAR testTLBNameW[] = {'t','e','s','t','_','t','l','b','.','t','l','b',0}; + + trace("Starting typelib dependency tests\n"); + + hr = LoadTypeLibEx(testTLBNameW, REGKIND_NONE, &ptLib); + ok(hr != S_OK, "test_tlb.tlb is on the path or registered\n"); + + filenameA = create_test_typelib(4); + MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH); + hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &ptLib); + ok(hr == S_OK, "got: %x\n", hr); + + hr = ITypeLib_GetTypeInfoOfGuid(ptLib, &IID_ITestDep, &ptInfo); + ok(hr == S_OK, "got: %x\n", hr); + + hr = ITypeInfo_GetRefTypeOfImplType(ptInfo, 0, &refType); + ok(hr == S_OK, "got: %x\n", hr); + + hr = ITypeInfo_GetRefTypeInfo(ptInfo, refType, &ptInfoExt); + todo_wine ok(hr == S_OK || broken(hr == TYPE_E_CANTLOADLIBRARY) /* win 2000 */, "got: %x\n", hr); + + ITypeInfo_Release(ptInfo); + if(ptInfoExt) + ITypeInfo_Release(ptInfoExt); + ITypeLib_Release(ptLib); + + DeleteFileW(filenameW); +} + START_TEST(typelib) { const char *filename; @@ -5548,4 +5587,5 @@ START_TEST(typelib) test_LoadRegTypeLib(); test_GetLibAttr(); test_stub(); + test_dep(); } diff --git a/dlls/xaudio2_8/Makefile.in b/dlls/xaudio2_8/Makefile.in new file mode 100644 index 0000000..e69de29 diff --git a/dlls/xaudio2_8/xaudio2_8.spec b/dlls/xaudio2_8/xaudio2_8.spec new file mode 100644 index 0000000..e69de29 diff --git a/dlls/xaudio2_8/xaudio2_8_main.c b/dlls/xaudio2_8/xaudio2_8_main.c new file mode 100644 index 0000000..e69de29