Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4fed489f
Commit
4fed489f
authored
May 27, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
May 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Added the remainder of tests for the IUri_Get* string functions.
parent
6d328c9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
195 additions
and
0 deletions
+195
-0
uri.c
dlls/urlmon/tests/uri.c
+167
-0
uri.c
dlls/urlmon/uri.c
+28
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
4fed489f
...
...
@@ -490,6 +490,27 @@ static void test_IUri_GetStrProperties(void) {
hr
=
IUri_GetPassword
(
uri
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: GetPassword returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
hr
=
IUri_GetPath
(
uri
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: GetPath returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
hr
=
IUri_GetPathAndQuery
(
uri
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: GetPathAndQuery returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
hr
=
IUri_GetQuery
(
uri
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: GetQuery returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
hr
=
IUri_GetRawUri
(
uri
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: GetRawUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
hr
=
IUri_GetSchemeName
(
uri
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: GetSchemeName returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
hr
=
IUri_GetUserInfo
(
uri
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: GetUserInfo returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
hr
=
IUri_GetUserName
(
uri
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: GetUserName returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
}
if
(
uri
)
IUri_Release
(
uri
);
...
...
@@ -660,6 +681,152 @@ static void test_IUri_GetStrProperties(void) {
}
SysFreeString
(
received
);
received
=
NULL
;
/* GetPath() tests. */
prop
=
test
.
str_props
[
Uri_PROPERTY_PATH
];
hr
=
IUri_GetPath
(
uri
,
&
received
);
if
(
prop
.
todo
)
{
todo_wine
{
ok
(
hr
==
prop
.
expected
,
"Error: GetPath 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: GetPath 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
;
/* GetPathAndQuery() tests. */
prop
=
test
.
str_props
[
Uri_PROPERTY_PATH_AND_QUERY
];
hr
=
IUri_GetPathAndQuery
(
uri
,
&
received
);
if
(
prop
.
todo
)
{
todo_wine
{
ok
(
hr
==
prop
.
expected
,
"Error: GetPathAndQuery 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: GetPathAndQuery 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
;
/* GetQuery() tests. */
prop
=
test
.
str_props
[
Uri_PROPERTY_QUERY
];
hr
=
IUri_GetQuery
(
uri
,
&
received
);
if
(
prop
.
todo
)
{
todo_wine
{
ok
(
hr
==
prop
.
expected
,
"Error: GetQuery 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: GetQuery 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
;
/* GetRawUri() tests. */
prop
=
test
.
str_props
[
Uri_PROPERTY_RAW_URI
];
hr
=
IUri_GetRawUri
(
uri
,
&
received
);
if
(
prop
.
todo
)
{
todo_wine
{
ok
(
hr
==
prop
.
expected
,
"Error: GetRawUri 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: GetRawUri 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
;
/* GetSchemeName() tests. */
prop
=
test
.
str_props
[
Uri_PROPERTY_SCHEME_NAME
];
hr
=
IUri_GetSchemeName
(
uri
,
&
received
);
if
(
prop
.
todo
)
{
todo_wine
{
ok
(
hr
==
prop
.
expected
,
"Error: GetSchemeName 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: GetSchemeName 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
;
/* GetUserInfo() tests. */
prop
=
test
.
str_props
[
Uri_PROPERTY_USER_INFO
];
hr
=
IUri_GetUserInfo
(
uri
,
&
received
);
if
(
prop
.
todo
)
{
todo_wine
{
ok
(
hr
==
prop
.
expected
,
"Error: GetUserInfo 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: GetUserInfo 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
;
/* GetUserName() tests. */
prop
=
test
.
str_props
[
Uri_PROPERTY_USER_NAME
];
hr
=
IUri_GetUserName
(
uri
,
&
received
);
if
(
prop
.
todo
)
{
todo_wine
{
ok
(
hr
==
prop
.
expected
,
"Error: GetUserName 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: GetUserName 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
);
}
if
(
uri
)
IUri_Release
(
uri
);
...
...
dlls/urlmon/uri.c
View file @
4fed489f
...
...
@@ -210,6 +210,10 @@ static HRESULT WINAPI Uri_GetPath(IUri *iface, BSTR *pstrPath)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrPath
);
if
(
!
pstrPath
)
return
E_POINTER
;
return
E_NOTIMPL
;
}
...
...
@@ -217,6 +221,10 @@ static HRESULT WINAPI Uri_GetPathAndQuery(IUri *iface, BSTR *pstrPathAndQuery)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrPathAndQuery
);
if
(
!
pstrPathAndQuery
)
return
E_POINTER
;
return
E_NOTIMPL
;
}
...
...
@@ -224,6 +232,10 @@ static HRESULT WINAPI Uri_GetQuery(IUri *iface, BSTR *pstrQuery)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrQuery
);
if
(
!
pstrQuery
)
return
E_POINTER
;
return
E_NOTIMPL
;
}
...
...
@@ -231,6 +243,10 @@ static HRESULT WINAPI Uri_GetRawUri(IUri *iface, BSTR *pstrRawUri)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrRawUri
);
if
(
!
pstrRawUri
)
return
E_POINTER
;
return
E_NOTIMPL
;
}
...
...
@@ -238,6 +254,10 @@ static HRESULT WINAPI Uri_GetSchemeName(IUri *iface, BSTR *pstrSchemeName)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrSchemeName
);
if
(
!
pstrSchemeName
)
return
E_POINTER
;
return
E_NOTIMPL
;
}
...
...
@@ -245,6 +265,10 @@ static HRESULT WINAPI Uri_GetUserInfo(IUri *iface, BSTR *pstrUserInfo)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrUserInfo
);
if
(
!
pstrUserInfo
)
return
E_POINTER
;
return
E_NOTIMPL
;
}
...
...
@@ -252,6 +276,10 @@ static HRESULT WINAPI Uri_GetUserName(IUri *iface, BSTR *pstrUserName)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrUserName
);
if
(
!
pstrUserName
)
return
E_POINTER
;
return
E_NOTIMPL
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment