urlmon/tests: Added tests for IUri_GetHost.
This commit is contained in:
parent
68db56d305
commit
d5e0a2edca
|
@ -710,6 +710,9 @@ static void test_IUri_GetStrProperties(void) {
|
||||||
hr = IUri_GetFragment(uri, NULL);
|
hr = IUri_GetFragment(uri, NULL);
|
||||||
ok(hr == E_POINTER, "Error: GetFragment returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER);
|
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);
|
hr = IUri_GetPassword(uri, NULL);
|
||||||
ok(hr == E_POINTER, "Error: GetPassword returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER);
|
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);
|
SysFreeString(received);
|
||||||
received = NULL;
|
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. */
|
/* GetPassword() tests. */
|
||||||
prop = test.str_props[Uri_PROPERTY_PASSWORD];
|
prop = test.str_props[Uri_PROPERTY_PASSWORD];
|
||||||
hr = IUri_GetPassword(uri, &received);
|
hr = IUri_GetPassword(uri, &received);
|
||||||
|
|
|
@ -224,6 +224,10 @@ static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
|
||||||
{
|
{
|
||||||
Uri *This = URI_THIS(iface);
|
Uri *This = URI_THIS(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, pstrHost);
|
FIXME("(%p)->(%p)\n", This, pstrHost);
|
||||||
|
|
||||||
|
if(!pstrHost)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue