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
adcb5f98
Commit
adcb5f98
authored
Dec 18, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Add some more tests for item moniker hashing.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
06479cb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
9 deletions
+28
-9
moniker.c
dlls/ole32/tests/moniker.c
+28
-9
No files found.
dlls/ole32/tests/moniker.c
View file @
adcb5f98
...
...
@@ -1747,6 +1747,20 @@ static void test_item_moniker(void)
{
NULL
,
L"Item1"
,
NULL
,
L"Item2"
,
S_FALSE
},
{
NULL
,
L"Item1"
,
NULL
,
L"ITEM1"
,
S_OK
},
};
static
const
struct
{
const
WCHAR
*
delim
;
const
WCHAR
*
item
;
DWORD
hash
;
}
hash_tests
[]
=
{
{
L"!"
,
L"Test"
,
0x73c
},
{
L"%"
,
L"Test"
,
0x73c
},
{
L"%"
,
L"TEST"
,
0x73c
},
{
L"%"
,
L"T"
,
0x54
},
{
L"%"
,
L"A"
,
0x41
},
{
L"%"
,
L"a"
,
0x41
},
};
IMoniker
*
moniker
,
*
moniker2
;
HRESULT
hr
;
DWORD
moniker_type
,
i
;
...
...
@@ -1851,6 +1865,20 @@ todo_wine
IMoniker_Release
(
moniker2
);
IMoniker_Release
(
moniker
);
/* Hashing */
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
hash_tests
);
++
i
)
{
hr
=
CreateItemMoniker
(
hash_tests
[
i
].
delim
,
hash_tests
[
i
].
item
,
&
moniker
);
ok
(
hr
==
S_OK
,
"Failed to create a moniker, hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_Hash
(
moniker
,
&
hash
);
ok
(
hr
==
S_OK
,
"Failed to get hash value, hr %#x.
\n
"
,
hr
);
ok
(
hash
==
hash_tests
[
i
].
hash
,
"%d: unexpected hash value %#x.
\n
"
,
i
,
hash
);
IMoniker_Release
(
moniker
);
}
hr
=
CreateItemMoniker
(
wszDelimiter
,
wszObjectName
,
&
moniker
);
ok_ole_success
(
hr
,
CreateItemMoniker
);
...
...
@@ -1860,15 +1888,6 @@ todo_wine
expected_item_moniker_comparison_data
,
sizeof
(
expected_item_moniker_comparison_data
),
54
,
expected_display_name
);
/* Hashing */
hr
=
IMoniker_Hash
(
moniker
,
&
hash
);
ok_ole_success
(
hr
,
IMoniker_Hash
);
ok
(
hash
==
0x73c
,
"Hash value != 0x73c, instead was 0x%08x
\n
"
,
hash
);
/* IsSystemMoniker test */
hr
=
IMoniker_IsSystemMoniker
(
moniker
,
&
moniker_type
);
...
...
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