From: Vibhav Pant vibhavp@gmail.com
--- dlls/rometadata/tests/rometadata.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/dlls/rometadata/tests/rometadata.c b/dlls/rometadata/tests/rometadata.c index b000e467d3c..66e0922ee80 100644 --- a/dlls/rometadata/tests/rometadata.c +++ b/dlls/rometadata/tests/rometadata.c @@ -1020,6 +1020,7 @@ static void test_IMetaDataImport(void) IMetaDataImport *md_import; const BYTE *data = NULL; const GUID *guid; + mdToken token; WCHAR *strW; HRESULT hr; ULONG val; @@ -1201,6 +1202,17 @@ static void test_IMetaDataImport(void) debugstr_mdToken(methoddef_tokens[i])); IMetaDataImport_CloseEnum(md_import, henum2);
+ token = mdTokenNil; + hr = IMetaDataImport_FindMember(md_import, typedef2, name, sig_blob, sig_len, &token); + todo_wine ok(hr == S_OK, "got hr %#lx\n", hr); + todo_wine ok(token == typedef_tokens[i], "got token %s != %s\n", debugstr_mdToken(token), + debugstr_mdToken(methoddef_tokens[i])); + token = mdTokenNil; + hr = IMetaDataImport_FindMember(md_import, typedef2, name, NULL, 0, &token); + todo_wine ok(hr == S_OK, "got hr %#lx\n", hr); + todo_wine ok(token == typedef_tokens[i], "got token %s != %s\n", debugstr_mdToken(token), + debugstr_mdToken(methoddef_tokens[i])); + winetest_pop_context(); } hr = IMetaDataImport_FindMethod(md_import, typedef2, NULL, NULL, 0, &methoddef); @@ -1319,6 +1331,17 @@ static void test_IMetaDataImport(void) todo_wine ok(fielddef == fielddef_tokens[field_idx], "got fielddef %s != %s\n", debugstr_mdToken(fielddef), debugstr_mdToken(fielddef_tokens[field_idx]));
+ token = mdTokenNil; + hr = IMetaDataImport_FindMember(md_import, typedef2, name, sig_blob, sig_len, &token); + todo_wine ok(hr == S_OK, "got hr %#lx\n", hr); + todo_wine ok(token == fielddef_tokens[field_idx], "got token %s != %s\n", debugstr_mdToken(token), + debugstr_mdToken(fielddef_tokens[field_idx])); + token = mdTokenNil; + hr = IMetaDataImport_FindMember(md_import, typedef2, name, NULL, 0, &token); + todo_wine ok(hr == S_OK, "got hr %#lx\n", hr); + todo_wine ok(token == fielddef_tokens[field_idx], "got token %s != %s\n", debugstr_mdToken(token), + debugstr_mdToken(fielddef_tokens[field_idx])); + winetest_pop_context(); } free(fielddef_tokens); @@ -1330,6 +1353,11 @@ static void test_IMetaDataImport(void) hr = IMetaDataImport_FindField(md_import, typedef2, L"foo", NULL, 0, &fielddef); todo_wine ok(hr == CLDB_E_RECORD_NOTFOUND, "got hr %#lx\n", hr);
+ hr = IMetaDataImport_FindMember(md_import, typedef1, NULL, NULL, 0, &token); + todo_wine ok(hr == E_INVALIDARG, "got hr %#lx\n", hr); + hr = IMetaDataImport_FindMember(md_import, typedef1, L"foo", NULL, 0, &token); + todo_wine ok(hr == CLDB_E_RECORD_NOTFOUND, "got hr %#lx\n", hr); + typedef1 = buf_len = 0; data = NULL; hr = IMetaDataImport_FindTypeDefByName(md_import, L"Wine.Test.ITest2", 0, &typedef1);