From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/opcservices/tests/opcservices.c | 166 +++++++++++++-------------- 1 file changed, 83 insertions(+), 83 deletions(-)
diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c index 5b9e551ee71..802837c19cf 100644 --- a/dlls/opcservices/tests/opcservices.c +++ b/dlls/opcservices/tests/opcservices.c @@ -61,19 +61,19 @@ static void test_package(void) ok(hr == S_OK, "Failed to create a package, hr %#lx.\n", hr);
hr = IOpcPackage_GetPartSet(package, &partset); - ok(SUCCEEDED(hr), "Failed to create a part set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create a part set, hr %#lx.\n", hr);
hr = IOpcPackage_GetPartSet(package, &partset2); - ok(SUCCEEDED(hr), "Failed to create a part set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create a part set, hr %#lx.\n", hr); ok(partset == partset2, "Expected same part set instance.\n"); IOpcPartSet_Release(partset2);
/* CreatePart */ hr = IOpcFactory_CreatePartUri(factory, L"/uri", &part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create part uri, hr %#lx.\n", hr);
hr = IOpcFactory_CreatePartUri(factory, L"/uri", &part_uri2); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create part uri, hr %#lx.\n", hr);
part = (void *)0xdeadbeef; hr = IOpcPartSet_CreatePart(partset, NULL, typeW, OPC_COMPRESSION_NONE, &part); @@ -84,9 +84,9 @@ static void test_package(void) ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartSet_CreatePart(partset, part_uri, typeW, 0xdeadbeef, &part); - ok(SUCCEEDED(hr), "Failed to create a part, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create a part, hr %#lx.\n", hr); hr = IOpcPart_GetCompressionOptions(part, &options); - ok(SUCCEEDED(hr), "Failed to get compression options, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get compression options, hr %#lx.\n", hr); ok(options == 0xdeadbeef, "Unexpected compression options %#x.\n", options);
part2 = (void *)0xdeadbeef; @@ -112,11 +112,11 @@ static void test_package(void) ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartSet_GetPart(partset, part_uri, &part2); - ok(SUCCEEDED(hr), "Failed to get part, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get part, hr %#lx.\n", hr); IOpcPart_Release(part2);
hr = IOpcFactory_CreatePartUri(factory, L"target", &part_uri2); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create part uri, hr %#lx.\n", hr);
hr = IOpcPartSet_GetPart(partset, part_uri2, &part2); ok(hr == OPC_E_NO_SUCH_PART, "Unexpected hr %#lx.\n", hr); @@ -126,23 +126,23 @@ static void test_package(void) ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPart_GetContentStream(part, &stream); - ok(SUCCEEDED(hr), "Failed to get content stream, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get content stream, hr %#lx.\n", hr);
hr = IStream_Write(stream, "abc", 3, NULL); ok(hr == S_OK, "Failed to write content, hr %#lx.\n", hr);
move.QuadPart = 0; hr = IStream_Seek(stream, move, STREAM_SEEK_CUR, &pos); - ok(SUCCEEDED(hr), "Seek failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Seek failed, hr %#lx.\n", hr); ok(pos.QuadPart == 3, "Unexpected position.\n");
hr = IOpcPart_GetContentStream(part, &stream2); - ok(SUCCEEDED(hr), "Failed to get content stream, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get content stream, hr %#lx.\n", hr); ok(stream != stream2, "Unexpected instance.\n");
move.QuadPart = 0; hr = IStream_Seek(stream2, move, STREAM_SEEK_CUR, &pos); - ok(SUCCEEDED(hr), "Seek failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Seek failed, hr %#lx.\n", hr); ok(pos.QuadPart == 0, "Unexpected position.\n");
memset(buff, 0, sizeof(buff)); @@ -152,27 +152,27 @@ static void test_package(void)
move.QuadPart = 0; hr = IStream_Seek(stream2, move, STREAM_SEEK_CUR, &pos); - ok(SUCCEEDED(hr), "Seek failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Seek failed, hr %#lx.\n", hr); ok(pos.QuadPart == 3, "Unexpected position.\n");
IStream_Release(stream); IStream_Release(stream2);
hr = IOpcPart_GetRelationshipSet(part, &relset); - ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get relationship set, hr %#lx.\n", hr);
hr = IOpcPart_GetRelationshipSet(part, &relset2); - ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get relationship set, hr %#lx.\n", hr); ok(relset == relset2, "Expected same part set instance.\n");
hr = CreateUri(L"target", Uri_CREATE_ALLOW_RELATIVE, 0, &target_uri); - ok(SUCCEEDED(hr), "Failed to create target uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create target uri, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_CreateRelationship(relset, NULL, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(SUCCEEDED(hr), "Failed to create relationship, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create relationship, hr %#lx.\n", hr);
hr = IOpcRelationship_GetSourceUri(rel, &uri); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get source uri, hr %#lx.\n", hr); ok(uri == (IOpcUri *)part_uri, "Unexpected source uri.\n");
IOpcUri_Release(uri); @@ -193,7 +193,7 @@ static void test_package(void)
ret = FALSE; hr = IOpcPartSet_PartExists(partset, part_uri, &ret); - ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret, "Expected part to exist.\n");
IOpcPartUri_Release(part_uri); @@ -201,10 +201,10 @@ static void test_package(void)
/* Relationships */ hr = IOpcPackage_GetRelationshipSet(package, &relset); - ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get relationship set, hr %#lx.\n", hr);
hr = IOpcPackage_GetRelationshipSet(package, &relset2); - ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get relationship set, hr %#lx.\n", hr); ok(relset == relset2, "Expected same part set instance.\n"); IOpcRelationshipSet_Release(relset); IOpcRelationshipSet_Release(relset2); @@ -216,9 +216,9 @@ static void test_package(void) hr = IOpcFactory_CreatePackageRootUri(factory, NULL); ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); hr = IOpcFactory_CreatePackageRootUri(factory, &uri); - ok(SUCCEEDED(hr), "Failed to create root uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create root uri, hr %#lx.\n", hr); hr = IOpcUri_GetRawUri(uri, &str); - ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get raw uri, hr %#lx.\n", hr); ok(!lstrcmpW(str, L"/"), "Unexpected uri %s.\n", wine_dbgstr_w(str)); SysFreeString(str); IOpcUri_Release(uri); @@ -237,7 +237,7 @@ static void test_stream_stat_(unsigned int line, IStream *stream, ULONG size)
memset(&statstg, 0xff, sizeof(statstg)); hr = IStream_Stat(stream, &statstg, 0); - ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get stat info, hr %#lx.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get stat info, hr %#lx.\n", hr);
ok_(__FILE__, line)(statstg.pwcsName == NULL, "Unexpected name %s.\n", wine_dbgstr_w(statstg.pwcsName)); ok_(__FILE__, line)(statstg.type == STGTY_STREAM, "Unexpected type.\n"); @@ -276,7 +276,7 @@ static void test_file_stream(void) ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = IOpcFactory_CreateStreamOnFile(factory, pathW, OPC_STREAM_IO_WRITE, NULL, 0, &stream); - ok(SUCCEEDED(hr), "Failed to create a write stream, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create a write stream, hr %#lx.\n", hr);
test_stream_stat(stream, 0);
@@ -293,7 +293,7 @@ static void test_file_stream(void)
/* Write to read-only stream. */ hr = IOpcFactory_CreateStreamOnFile(factory, pathW, OPC_STREAM_IO_READ, NULL, 0, &stream); - ok(SUCCEEDED(hr), "Failed to create a read stream, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create a read stream, hr %#lx.\n", hr);
test_stream_stat(stream, size); hr = IStream_Write(stream, pathW, size, NULL); @@ -302,7 +302,7 @@ static void test_file_stream(void)
/* Read from write-only stream. */ hr = IOpcFactory_CreateStreamOnFile(factory, pathW, OPC_STREAM_IO_WRITE, NULL, 0, &stream); - ok(SUCCEEDED(hr), "Failed to create a read stream, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create a read stream, hr %#lx.\n", hr);
test_stream_stat(stream, 0); hr = IStream_Write(stream, pathW, size, NULL); @@ -311,7 +311,7 @@ static void test_file_stream(void)
move.QuadPart = 0; hr = IStream_Seek(stream, move, STREAM_SEEK_SET, NULL); - ok(SUCCEEDED(hr), "Seek failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Seek failed, hr %#lx.\n", hr);
hr = IStream_Read(stream, buff, sizeof(buff), NULL); ok(hr == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED), "Stream read failed, hr %#lx.\n", hr); @@ -344,13 +344,13 @@ static void test_relationship(void) ok(hr == S_OK, "Failed to create a package, hr %#lx.\n", hr);
hr = CreateUri(L"target", Uri_CREATE_ALLOW_RELATIVE, 0, &target_uri); - ok(SUCCEEDED(hr), "Failed to create target uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create target uri, hr %#lx.\n", hr);
hr = CreateUri(L"file://host/file.txt", 0, 0, &target_uri2); - ok(SUCCEEDED(hr), "Failed to create target uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create target uri, hr %#lx.\n", hr);
hr = IOpcPackage_GetRelationshipSet(package, &rels); - ok(SUCCEEDED(hr), "Failed to get part set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get part set, hr %#lx.\n", hr);
rel = (void *)0xdeadbeef; hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, NULL, NULL, OPC_URI_TARGET_MODE_INTERNAL, &rel); @@ -372,11 +372,11 @@ static void test_relationship(void) ok(rel == NULL, "Unexpected instance %p.\n", rel);
hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(SUCCEEDED(hr), "Failed to create relationship, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create relationship, hr %#lx.\n", hr);
/* Autogenerated relationship id */ hr = IOpcRelationship_GetId(rel, &id); - ok(SUCCEEDED(hr), "Failed to get id, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get id, hr %#lx.\n", hr); ok(lstrlenW(id) == 9 && *id == 'R', "Unexpected relationship id %s.\n", wine_dbgstr_w(id));
hr = IOpcRelationshipSet_CreateRelationship(rels, id, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel2); @@ -386,7 +386,7 @@ static void test_relationship(void) ok(hr == OPC_E_DUPLICATE_RELATIONSHIP, "Failed to create relationship, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, typeW, target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel2); - ok(SUCCEEDED(hr), "Failed to create relationship, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create relationship, hr %#lx.\n", hr);
ret = 123; hr = IOpcRelationshipSet_RelationshipExists(rels, NULL, &ret); @@ -398,11 +398,11 @@ static void test_relationship(void)
ret = FALSE; hr = IOpcRelationshipSet_RelationshipExists(rels, id, &ret); - ok(SUCCEEDED(hr), "Failed to get relationship, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get relationship, hr %#lx.\n", hr); ok(ret, "Unexpected result %d.\n", ret);
hr = IOpcRelationshipSet_GetRelationship(rels, id, &rel3); - ok(SUCCEEDED(hr), "Failed to get relationship, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get relationship, hr %#lx.\n", hr); IOpcRelationship_Release(rel3);
hr = IOpcRelationshipSet_GetRelationship(rels, id, NULL); @@ -421,45 +421,45 @@ static void test_relationship(void)
ret = TRUE; hr = IOpcRelationshipSet_RelationshipExists(rels, id, &ret); - ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!ret, "Unexpected result %d.\n", ret);
CoTaskMemFree(id);
hr = IOpcRelationship_GetTargetUri(rel, &uri); - ok(SUCCEEDED(hr), "Failed to get target uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get target uri, hr %#lx.\n", hr); ok(uri == target_uri, "Unexpected uri.\n"); IUri_Release(uri);
hr = IOpcRelationship_GetTargetMode(rel, &mode); - ok(SUCCEEDED(hr), "Failed to get target mode, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get target mode, hr %#lx.\n", hr); ok(mode == OPC_URI_TARGET_MODE_INTERNAL, "Unexpected mode %d.\n", mode);
/* Source uri */ hr = IOpcFactory_CreatePackageRootUri(factory, &source_uri); - ok(SUCCEEDED(hr), "Failed to create root uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create root uri, hr %#lx.\n", hr);
hr = IOpcFactory_CreatePackageRootUri(factory, &source_uri2); - ok(SUCCEEDED(hr), "Failed to create root uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create root uri, hr %#lx.\n", hr); ok(source_uri != source_uri2, "Unexpected uri instance.\n");
IOpcUri_Release(source_uri); IOpcUri_Release(source_uri2);
hr = IOpcRelationship_GetSourceUri(rel, &source_uri); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get source uri, hr %#lx.\n", hr);
hr = IOpcUri_QueryInterface(source_uri, &IID_IOpcPartUri, (void **)&unk); ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
str = NULL; hr = IOpcUri_GetRawUri(source_uri, &str); - ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get raw uri, hr %#lx.\n", hr); ok(!lstrcmpW(L"/", str), "Unexpected uri %s.\n", wine_dbgstr_w(str)); SysFreeString(str);
hr = IOpcRelationship_GetSourceUri(rel2, &source_uri2); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get source uri, hr %#lx.\n", hr); ok(source_uri2 == source_uri, "Unexpected source uri.\n");
IOpcUri_Release(source_uri2); @@ -521,7 +521,7 @@ static void test_rel_part_uri(void) factory = create_factory();
hr = IOpcFactory_CreatePartUri(factory, L"/uri", &part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create part uri, hr %#lx.\n", hr);
hr = IOpcPartUri_GetRelationshipsPartUri(part_uri, NULL); ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); @@ -552,11 +552,11 @@ static void test_rel_part_uri(void) } else hr = IOpcFactory_CreatePartUri(factory, rel_part_uri_tests[i].uri, (IOpcPartUri **)&part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create part uri, hr %#lx.\n", hr);
rel_uri = (void *)0xdeadbeef; hr = IOpcUri_GetRelationshipsPartUri(part_uri, &rel_uri); - if (SUCCEEDED(hr)) + if (hr == S_OK) { IOpcPartUri *rel_uri2; IOpcUri *source_uri2; @@ -565,9 +565,9 @@ static void test_rel_part_uri(void) BSTR str;
hr = IOpcPartUri_GetSourceUri(rel_uri, &source_uri); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get source uri, hr %#lx.\n", hr); hr = IOpcPartUri_GetSourceUri(rel_uri, &source_uri2); - ok(SUCCEEDED(hr), "Failed to get source uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get source uri, hr %#lx.\n", hr); ok(source_uri != source_uri2, "Unexpected instance.\n");
hr = IOpcUri_IsEqual(source_uri, NULL, NULL); @@ -580,7 +580,7 @@ static void test_rel_part_uri(void)
ret = FALSE; hr = IOpcUri_IsEqual(source_uri, (IUri *)source_uri2, &ret); - ok(SUCCEEDED(hr), "IsEqual failed, hr %#lx.\n", hr); + ok(hr == S_OK, "IsEqual failed, hr %#lx.\n", hr); ok(ret, "Expected equal uris.\n");
hr = IOpcUri_QueryInterface(source_uri, &IID_IOpcPartUri, (void **)&unk); @@ -592,12 +592,12 @@ static void test_rel_part_uri(void) IOpcUri_Release(source_uri);
hr = IOpcUri_GetRelationshipsPartUri(part_uri, &rel_uri2); - ok(SUCCEEDED(hr), "Failed to get rels part uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get rels part uri, hr %#lx.\n", hr); ok(rel_uri2 != rel_uri, "Unexpected instance.\n"); IOpcPartUri_Release(rel_uri2);
hr = IOpcPartUri_GetRawUri(rel_uri, &str); - ok(SUCCEEDED(hr), "Failed to get rel uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get rel uri, hr %#lx.\n", hr); todo_wine_if(i == 3 || i == 4 || i == 8 || i == 9) ok(!lstrcmpW(str, rel_part_uri_tests[i].rel_uri), "%u: unexpected rel uri %s, expected %s.\n", i, wine_dbgstr_w(str), wine_dbgstr_w(rel_part_uri_tests[i].rel_uri)); @@ -620,11 +620,11 @@ static void test_rel_part_uri(void) BOOL ret;
hr = IOpcFactory_CreatePartUri(factory, is_rel_part_tests[i].uri, &part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create part uri, hr %#lx.\n", hr);
ret = 123; hr = IOpcPartUri_IsRelationshipsPartUri(part_uri, &ret); - ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ret == is_rel_part_tests[i].ret, "%u: unexpected result %d.\n", i, ret);
IOpcPartUri_Release(part_uri); @@ -650,16 +650,16 @@ static void test_part_enumerator(void) ok(hr == S_OK, "Failed to create a package, hr %#lx.\n", hr);
hr = IOpcPackage_GetPartSet(package, &parts); - ok(SUCCEEDED(hr), "Failed to get part set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get part set, hr %#lx.\n", hr);
hr = IOpcPartSet_GetEnumerator(parts, NULL); ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartSet_GetEnumerator(parts, &partenum); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get enumerator, hr %#lx.\n", hr);
hr = IOpcPartSet_GetEnumerator(parts, &partenum2); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get enumerator, hr %#lx.\n", hr); ok(partenum != partenum2, "Unexpected instance.\n"); IOpcPartEnumerator_Release(partenum2);
@@ -683,10 +683,10 @@ static void test_part_enumerator(void) ok(!ret, "Unexpected result %d.\n", ret);
hr = IOpcFactory_CreatePartUri(factory, L"/uri", &part_uri); - ok(SUCCEEDED(hr), "Failed to create part uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create part uri, hr %#lx.\n", hr);
hr = IOpcPartSet_CreatePart(parts, part_uri, L"type/subtype", OPC_COMPRESSION_NONE, &part); - ok(SUCCEEDED(hr), "Failed to create a part, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create a part, hr %#lx.\n", hr); IOpcPartUri_Release(part_uri);
part2 = (void *)0xdeadbeef; @@ -721,7 +721,7 @@ static void test_part_enumerator(void) IOpcPartEnumerator_Release(partenum);
hr = IOpcPartSet_GetEnumerator(parts, &partenum); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get enumerator, hr %#lx.\n", hr);
part2 = (void *)0xdeadbeef; hr = IOpcPartEnumerator_GetCurrent(partenum, &part2); @@ -763,7 +763,7 @@ static void test_part_enumerator(void) ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
hr = IOpcPartEnumerator_Clone(partenum, &partenum2); - ok(SUCCEEDED(hr), "Clone failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Clone failed, hr %#lx.\n", hr);
hr = IOpcPartEnumerator_MoveNext(partenum2, &ret); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -805,16 +805,16 @@ static void test_rels_enumerator(void) ok(hr == S_OK, "Failed to create a package, hr %#lx.\n", hr);
hr = IOpcPackage_GetRelationshipSet(package, &rels); - ok(SUCCEEDED(hr), "Failed to get part set, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get part set, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_GetEnumerator(rels, NULL); ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IOpcRelationshipSet_GetEnumerator(rels, &relsenum); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get enumerator, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_GetEnumerator(rels, &relsenum2); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get enumerator, hr %#lx.\n", hr); ok(relsenum != relsenum2, "Unexpected instance.\n"); IOpcRelationshipEnumerator_Release(relsenum2);
@@ -838,10 +838,10 @@ static void test_rels_enumerator(void) ok(!ret, "Unexpected result %d.\n", ret);
hr = CreateUri(L"target", Uri_CREATE_ALLOW_RELATIVE, 0, &target_uri); - ok(SUCCEEDED(hr), "Failed to create target uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create target uri, hr %#lx.\n", hr);
hr = IOpcRelationshipSet_CreateRelationship(rels, NULL, L"type/subtype", target_uri, OPC_URI_TARGET_MODE_INTERNAL, &rel); - ok(SUCCEEDED(hr), "Failed to create relationship, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create relationship, hr %#lx.\n", hr);
IUri_Release(target_uri);
@@ -877,7 +877,7 @@ static void test_rels_enumerator(void) IOpcRelationshipEnumerator_Release(relsenum);
hr = IOpcRelationshipSet_GetEnumerator(rels, &relsenum); - ok(SUCCEEDED(hr), "Failed to get enumerator, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get enumerator, hr %#lx.\n", hr);
rel2 = (void *)0xdeadbeef; hr = IOpcRelationshipEnumerator_GetCurrent(relsenum, &rel2); @@ -919,7 +919,7 @@ static void test_rels_enumerator(void) ok(hr == OPC_E_ENUM_INVALID_POSITION, "Unexpected hr %#lx.\n", hr);
hr = IOpcRelationshipEnumerator_Clone(relsenum, &relsenum2); - ok(SUCCEEDED(hr), "Clone failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Clone failed, hr %#lx.\n", hr);
hr = IOpcRelationshipEnumerator_MoveNext(relsenum2, &ret); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -986,22 +986,22 @@ static void test_relative_uri(void) hr = IOpcFactory_CreatePackageRootUri(factory, &part_uri); else hr = IOpcFactory_CreatePartUri(factory, relative_uri_tests[i].part, (IOpcPartUri **)&part_uri); - ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed to create part uri, hr %#lx.\n", i, hr);
hr = IOpcFactory_CreatePartUri(factory, relative_uri_tests[i].combined, &combined_uri); - ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed to create part uri, hr %#lx.\n", i, hr);
hr = IOpcUri_GetRelativeUri(part_uri, combined_uri, &relative_uri); todo_wine - ok(SUCCEEDED(hr), "%u: failed t oget relative uri, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed t oget relative uri, hr %#lx.\n", i, hr);
- if (SUCCEEDED(hr)) + if (hr == S_OK) { hr = IUri_QueryInterface(relative_uri, &IID_IOpcUri, (void **)&unk); ok(hr == E_NOINTERFACE, "%u: unexpected hr %#lx.\n", i, hr);
hr = IUri_GetRawUri(relative_uri, &str); - ok(SUCCEEDED(hr), "%u: failed to get raw uri, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed to get raw uri, hr %#lx.\n", i, hr); ok(!lstrcmpW(str, relative_uri_tests[i].relative) || broken(relative_broken && !lstrcmpW(str, relative_broken)), "%u: unexpected relative uri %s.\n", i, wine_dbgstr_w(str)); SysFreeString(str); @@ -1047,10 +1047,10 @@ static void test_combine_uri(void) hr = IOpcFactory_CreatePackageRootUri(factory, &uri); else hr = IOpcFactory_CreatePartUri(factory, combine_tests[i].uri, (IOpcPartUri **)&uri); - ok(SUCCEEDED(hr), "%u: failed to create uri, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed to create uri, hr %#lx.\n", i, hr);
hr = CreateUri(combine_tests[i].relative, Uri_CREATE_ALLOW_RELATIVE, 0, &relative_uri); - ok(SUCCEEDED(hr), "%u: failed to create relative uri, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed to create relative uri, hr %#lx.\n", i, hr);
combined_uri = (void *)0xdeadbeef; hr = IOpcUri_CombinePartUri(uri, NULL, &combined_uri); @@ -1061,10 +1061,10 @@ static void test_combine_uri(void) ok(hr == E_POINTER, "%u: failed to combine uris, hr %#lx.\n", i, hr);
hr = IOpcUri_CombinePartUri(uri, relative_uri, &combined_uri); - ok(SUCCEEDED(hr), "%u: failed to combine uris, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed to combine uris, hr %#lx.\n", i, hr);
hr = IOpcPartUri_GetRawUri(combined_uri, &str); - ok(SUCCEEDED(hr), "%u: failed to get raw uri, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed to get raw uri, hr %#lx.\n", i, hr); todo_wine_if(i == 2 || i == 3) ok(!lstrcmpW(str, combine_tests[i].combined), "%u: unexpected uri %s.\n", i, wine_dbgstr_w(str)); SysFreeString(str); @@ -1108,20 +1108,20 @@ static void test_create_part_uri(void) BOOL ret;
hr = IOpcFactory_CreatePartUri(factory, create_part_uri_tests[i].input, &part_uri); - ok(SUCCEEDED(hr), "%u: failed to create part uri, hr %#lx.\n", i, hr); + ok(hr == S_OK, "%u: failed to create part uri, hr %#lx.\n", i, hr);
hr = IOpcPartUri_GetRawUri(part_uri, &str); - ok(SUCCEEDED(hr), "Failed to get raw uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to get raw uri, hr %#lx.\n", hr); todo_wine_if(i == 1 || i == 2 || i == 4) ok(!lstrcmpW(str, raw_uri), "%u: unexpected raw uri %s.\n", i, wine_dbgstr_w(str)); SysFreeString(str);
hr = CreateUri(raw_uri, Uri_CREATE_ALLOW_RELATIVE, 0, &uri); - ok(SUCCEEDED(hr), "Failed to create uri, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create uri, hr %#lx.\n", hr);
ret = FALSE; hr = IOpcPartUri_IsEqual(part_uri, uri, &ret); - ok(SUCCEEDED(hr), "IsEqual failed, hr %#lx.\n", hr); + ok(hr == S_OK, "IsEqual failed, hr %#lx.\n", hr); todo_wine_if(i == 1 || i == 2 || i == 4) ok(!!ret, "%u: unexpected result %d.\n", i, ret);
@@ -1191,7 +1191,7 @@ static void test_write_package(void) ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(SUCCEEDED(hr), "Failed to create a stream, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
hr = IOpcFactory_WritePackageToStream(factory, NULL, OPC_WRITE_FORCE_ZIP32, stream); ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); @@ -1333,7 +1333,7 @@ START_TEST(opcservices) HRESULT hr;
hr = CoInitialize(NULL); - ok(SUCCEEDED(hr), "Failed to initialize COM, hr %#lx.\n", hr); + ok(hr == S_OK, "Failed to initialize COM, hr %#lx.\n", hr);
if (!(factory = create_factory())) { win_skip("Failed to create IOpcFactory factory.\n");