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
f8180550
Commit
f8180550
authored
Mar 31, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20/tests: Add some object identity tests.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
43d377c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
richole.c
dlls/riched20/tests/richole.c
+9
-0
txtsrv.c
dlls/riched20/tests/txtsrv.c
+9
-0
No files found.
dlls/riched20/tests/richole.c
View file @
f8180550
...
...
@@ -149,6 +149,7 @@ static void test_Interfaces(void)
LRESULT
res
;
HWND
w
;
ULONG
refcount
;
IUnknown
*
unk
,
*
unk2
;
w
=
new_richedit
(
NULL
);
if
(
!
w
)
{
...
...
@@ -180,6 +181,14 @@ static void test_Interfaces(void)
hres
=
ITextDocument_GetSelection
(
txtDoc
,
&
txtSel
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
hres
=
ITextDocument_QueryInterface
(
txtDoc
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
hres
=
ITextSelection_QueryInterface
(
txtSel
,
&
IID_IUnknown
,
(
void
**
)
&
unk2
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
ok
(
unk
!=
unk2
,
"unknowns are the same
\n
"
);
IUnknown_Release
(
unk2
);
IUnknown_Release
(
unk
);
EXPECT_REF
(
txtDoc
,
4
);
EXPECT_REF
(
txtSel
,
2
);
...
...
dlls/riched20/tests/txtsrv.c
View file @
f8180550
...
...
@@ -917,6 +917,7 @@ static void test_QueryInterface(void)
IRichEditOle
*
reole
,
*
txtsrv_reole
;
ITextDocument
*
txtdoc
,
*
txtsrv_txtdoc
;
ITextDocument2Old
*
txtdoc2old
,
*
txtsrv_txtdoc2old
;
IUnknown
*
unk
,
*
unk2
;
ULONG
refcount
;
if
(
!
init_texthost
(
&
txtserv
,
&
host
))
...
...
@@ -933,6 +934,14 @@ static void test_QueryInterface(void)
refcount
=
get_refcount
((
IUnknown
*
)
txtsrv_reole
);
ok
(
refcount
==
2
,
"got wrong ref count: %d
\n
"
,
refcount
);
hres
=
ITextServices_QueryInterface
(
txtserv
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
hres
=
IRichEditOle_QueryInterface
(
txtsrv_reole
,
&
IID_IUnknown
,
(
void
**
)
&
unk2
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
ok
(
unk
==
unk2
,
"unknowns differ
\n
"
);
IUnknown_Release
(
unk2
);
IUnknown_Release
(
unk
);
hres
=
IRichEditOle_QueryInterface
(
txtsrv_reole
,
&
IID_ITextDocument
,
(
void
**
)
&
txtdoc
);
ok
(
hres
==
S_OK
,
"IRichEditOle_QueryInterface: 0x%08x
\n
"
,
hres
);
refcount
=
get_refcount
((
IUnknown
*
)
txtserv
);
...
...
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