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
cb3e537b
Commit
cb3e537b
authored
Jan 30, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Feb 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: HashData is not present on Win95B (winetestbot).
parent
29edebe0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
url.c
dlls/shlwapi/tests/url.c
+11
-9
No files found.
dlls/shlwapi/tests/url.c
View file @
cb3e537b
...
...
@@ -34,6 +34,7 @@ static HMODULE hShlwapi;
static
HRESULT
(
WINAPI
*
pUrlCanonicalizeW
)(
LPCWSTR
,
LPWSTR
,
LPDWORD
,
DWORD
);
static
HRESULT
(
WINAPI
*
pParseURLA
)(
LPCSTR
,
PARSEDURLA
*
);
static
HRESULT
(
WINAPI
*
pParseURLW
)(
LPCWSTR
,
PARSEDURLW
*
);
static
HRESULT
(
WINAPI
*
pHashData
)(
LPBYTE
,
DWORD
,
LPBYTE
,
DWORD
);
static
const
char
*
TEST_URL_1
=
"http://www.winehq.org/tests?date=10/10/1923"
;
static
const
char
*
TEST_URL_2
=
"http://localhost:8080/tests%2e.html?date=Mon%2010/10/1923"
;
...
...
@@ -1102,36 +1103,36 @@ static void test_HashData(void)
int
i
;
/* Test hashing with identically sized input/output buffers. */
res
=
HashData
(
input
,
16
,
output
,
16
);
res
=
p
HashData
(
input
,
16
,
output
,
16
);
ok
(
res
==
S_OK
,
"Expected HashData to return S_OK, got 0x%08x
\n
"
,
res
);
if
(
res
==
S_OK
)
ok
(
!
memcmp
(
output
,
expected
,
sizeof
(
expected
)),
"Output buffer did not match expected contents
\n
"
);
/* Test hashing with larger output buffer. */
res
=
HashData
(
input
,
16
,
output
,
32
);
res
=
p
HashData
(
input
,
16
,
output
,
32
);
ok
(
res
==
S_OK
,
"Expected HashData to return S_OK, got 0x%08x
\n
"
,
res
);
if
(
res
==
S_OK
)
ok
(
!
memcmp
(
output
,
expected2
,
sizeof
(
expected2
)),
"Output buffer did not match expected contents
\n
"
);
/* Test hashing with smaller input buffer. */
res
=
HashData
(
input
,
8
,
output
,
16
);
res
=
p
HashData
(
input
,
8
,
output
,
16
);
ok
(
res
==
S_OK
,
"Expected HashData to return S_OK, got 0x%08x
\n
"
,
res
);
if
(
res
==
S_OK
)
ok
(
!
memcmp
(
output
,
expected3
,
sizeof
(
expected3
)),
"Output buffer did not match expected contents
\n
"
);
/* Test passing NULL pointers for input/output parameters. */
res
=
HashData
(
NULL
,
0
,
NULL
,
0
);
res
=
p
HashData
(
NULL
,
0
,
NULL
,
0
);
ok
(
res
==
E_INVALIDARG
||
broken
(
res
==
S_OK
),
/* Windows 2000 */
"Expected HashData to return E_INVALIDARG, got 0x%08x
\n
"
,
res
);
res
=
HashData
(
input
,
0
,
NULL
,
0
);
res
=
p
HashData
(
input
,
0
,
NULL
,
0
);
ok
(
res
==
E_INVALIDARG
||
broken
(
res
==
S_OK
),
/* Windows 2000 */
"Expected HashData to return E_INVALIDARG, got 0x%08x
\n
"
,
res
);
res
=
HashData
(
NULL
,
0
,
output
,
0
);
res
=
p
HashData
(
NULL
,
0
,
output
,
0
);
ok
(
res
==
E_INVALIDARG
||
broken
(
res
==
S_OK
),
/* Windows 2000 */
"Expected HashData to return E_INVALIDARG, got 0x%08x
\n
"
,
res
);
...
...
@@ -1142,7 +1143,7 @@ static void test_HashData(void)
for
(
i
=
0
;
i
<
sizeof
(
output
)
/
sizeof
(
BYTE
);
i
++
)
output
[
i
]
=
0xFF
;
res
=
HashData
(
input
,
0
,
output
,
0
);
res
=
p
HashData
(
input
,
0
,
output
,
0
);
ok
(
res
==
S_OK
,
"Expected HashData to return S_OK, got 0x%08x
\n
"
,
res
);
/* The buffers should be unchanged. */
...
...
@@ -1159,12 +1160,12 @@ static void test_HashData(void)
}
/* Input/output parameters are not validated. */
res
=
HashData
((
BYTE
*
)
0xdeadbeef
,
0
,
(
BYTE
*
)
0xdeadbeef
,
0
);
res
=
p
HashData
((
BYTE
*
)
0xdeadbeef
,
0
,
(
BYTE
*
)
0xdeadbeef
,
0
);
ok
(
res
==
S_OK
,
"Expected HashData to return S_OK, got 0x%08x
\n
"
,
res
);
if
(
0
)
{
res
=
HashData
((
BYTE
*
)
0xdeadbeef
,
1
,
(
BYTE
*
)
0xdeadbeef
,
1
);
res
=
p
HashData
((
BYTE
*
)
0xdeadbeef
,
1
,
(
BYTE
*
)
0xdeadbeef
,
1
);
trace
(
"HashData returned 0x%08x
\n
"
,
res
);
}
}
...
...
@@ -1178,6 +1179,7 @@ START_TEST(url)
pUrlCanonicalizeW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"UrlCanonicalizeW"
);
pParseURLA
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
(
LPCSTR
)
1
);
pParseURLW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
(
LPCSTR
)
2
);
pHashData
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"HashData"
);
test_UrlApplyScheme
();
test_UrlHash
();
...
...
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