From cca98c460dfcebb56043335c07dfbe7ef22dc8df Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 17 Mar 2010 22:05:20 +0100 Subject: [PATCH] oleaut32/tests: Make tests working on older systems, prevent crash on some wine boxes. --- dlls/oleaut32/tests/typelib.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 6e44f58f9b5..8a8766a82d2 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1076,6 +1076,10 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); ok(hres == S_OK, "got %08x\n", hres); + if(hres != S_OK) { + skip("Skipping some tests\n"); + return; + } hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); @@ -1434,18 +1438,18 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeLib2_SaveAllChanges(createtl); ok(hres == S_OK, "got %08x\n", hres); - hres = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hres == S_OK, "got %08x\n", hres); - ok(ITypeInfo_Release(interface2)==0, "Object should be freed\n"); ok(ITypeInfo_Release(interface1)==0, "Object should be freed\n"); ok(ITypeInfo_Release(dual)==0, "Object should be freed\n"); ok(ICreateTypeLib2_Release(createtl)==0, "Object should be freed\n"); + ok(ITypeInfo_Release(dispatch)==0, "Object should be freed\n"); ok(ITypeInfo_Release(unknown)==0, "Object should be freed\n"); + ok(ITypeLib_Release(stdole)==0, "Object should be freed\n"); + hres = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); + ok(hres == S_OK, "got %08x\n", hres); ok(ITypeLib_Release(tl)==0, "Object should be freed\n"); - ok(ITypeLib_Release(stdole)==0, "Object should be freed\n"); DeleteFileA(filename); } -- 2.11.4.GIT