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
7b07188d
Commit
7b07188d
authored
Dec 17, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Add some tests for item moniker equality.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0c9205ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
moniker.c
dlls/ole32/tests/moniker.c
+38
-0
No files found.
dlls/ole32/tests/moniker.c
View file @
7b07188d
...
...
@@ -1728,6 +1728,23 @@ static void test_item_moniker(void)
{
item_moniker_unicode_item_stream
,
sizeof
(
item_moniker_unicode_item_stream
),
L"!B"
},
{
item_moniker_unicode_delim_item_stream
,
sizeof
(
item_moniker_unicode_delim_item_stream
),
L"!C"
},
};
static
const
struct
{
const
WCHAR
*
delim1
;
const
WCHAR
*
item1
;
const
WCHAR
*
delim2
;
const
WCHAR
*
item2
;
HRESULT
hr
;
}
isequal_tests
[]
=
{
{
L"!"
,
L"Item1"
,
L"!"
,
L"ITEM1"
,
S_OK
},
{
NULL
,
L"Item1"
,
L"!"
,
L"ITEM1"
,
S_OK
},
{
L""
,
L"Item1"
,
L"!"
,
L"ITEM1"
,
S_OK
},
{
L"&"
,
L"Item1"
,
L"!"
,
L"ITEM1"
,
S_OK
},
{
L"&&"
,
L"Item1"
,
L"&"
,
L"&Item1"
,
S_FALSE
},
{
NULL
,
L"Item1"
,
NULL
,
L"Item2"
,
S_FALSE
},
{
NULL
,
L"Item1"
,
NULL
,
L"ITEM1"
,
S_OK
},
};
IMoniker
*
moniker
,
*
moniker2
;
HRESULT
hr
;
DWORD
moniker_type
,
i
;
...
...
@@ -1879,6 +1896,27 @@ todo_wine
IMoniker_Release
(
inverse
);
IMoniker_Release
(
moniker
);
/* IsEqual */
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
isequal_tests
);
++
i
)
{
hr
=
CreateItemMoniker
(
isequal_tests
[
i
].
delim1
,
isequal_tests
[
i
].
item1
,
&
moniker
);
ok
(
hr
==
S_OK
,
"Failed to create moniker, hr %#x.
\n
"
,
hr
);
hr
=
CreateItemMoniker
(
isequal_tests
[
i
].
delim2
,
isequal_tests
[
i
].
item2
,
&
moniker2
);
ok
(
hr
==
S_OK
,
"Failed to create moniker, hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_IsEqual
(
moniker
,
moniker2
);
todo_wine_if
(
i
==
4
||
i
==
5
)
ok
(
hr
==
isequal_tests
[
i
].
hr
,
"%d: unexpected result %#x.
\n
"
,
i
,
hr
);
hr
=
IMoniker_IsEqual
(
moniker2
,
moniker
);
todo_wine_if
(
i
==
4
||
i
==
5
)
ok
(
hr
==
isequal_tests
[
i
].
hr
,
"%d: unexpected result %#x.
\n
"
,
i
,
hr
);
IMoniker_Release
(
moniker
);
IMoniker_Release
(
moniker2
);
}
}
static
void
test_anti_moniker
(
void
)
...
...
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