urlmon/tests: Added tests for IUri_GetHost.

This commit is contained in:
Thomas Mullaly 2010-06-01 20:32:09 -04:00 committed by Alexandre Julliard
parent 68db56d305
commit d5e0a2edca
2 changed files with 28 additions and 0 deletions

View File

@ -710,6 +710,9 @@ static void test_IUri_GetStrProperties(void) {
hr = IUri_GetFragment(uri, NULL);
ok(hr == E_POINTER, "Error: GetFragment returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER);
hr = IUri_GetHost(uri, NULL);
ok(hr == E_POINTER, "Error: GetHost returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER);
hr = IUri_GetPassword(uri, NULL);
ok(hr == E_POINTER, "Error: GetPassword returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER);
@ -883,6 +886,27 @@ static void test_IUri_GetStrProperties(void) {
SysFreeString(received);
received = NULL;
/* GetHost() tests. */
prop = test.str_props[Uri_PROPERTY_HOST];
hr = IUri_GetHost(uri, &received);
if(prop.todo) {
todo_wine {
ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
}
todo_wine {
ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n",
prop.value, wine_dbgstr_w(received), i);
}
} else {
ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n",
prop.value, wine_dbgstr_w(received), i);
}
SysFreeString(received);
received = NULL;
/* GetPassword() tests. */
prop = test.str_props[Uri_PROPERTY_PASSWORD];
hr = IUri_GetPassword(uri, &received);

View File

@ -224,6 +224,10 @@ static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
{
Uri *This = URI_THIS(iface);
FIXME("(%p)->(%p)\n", This, pstrHost);
if(!pstrHost)
return E_POINTER;
return E_NOTIMPL;
}