Commit d5e0a2ed authored by Thomas Mullaly's avatar Thomas Mullaly Committed by Alexandre Julliard

urlmon/tests: Added tests for IUri_GetHost.

parent 68db56d3
......@@ -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);
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment