Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6a335ca5
Commit
6a335ca5
authored
May 27, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: A bit more tests for GetChar(), improve tracing.
parent
cb095a82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
richole.c
dlls/riched20/richole.c
+6
-2
richole.c
dlls/riched20/tests/richole.c
+20
-4
No files found.
dlls/riched20/richole.c
View file @
6a335ca5
...
...
@@ -1468,9 +1468,11 @@ static HRESULT WINAPI ITextRange_fnGetChar(ITextRange *me, LONG *pch)
ITextRangeImpl
*
This
=
impl_from_ITextRange
(
me
);
ME_Cursor
cursor
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pch
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
TRACE
(
"%p
\n
"
,
pch
);
if
(
!
pch
)
return
E_INVALIDARG
;
...
...
@@ -3934,9 +3936,11 @@ static HRESULT WINAPI ITextSelection_fnGetChar(ITextSelection *me, LONG *pch)
ITextSelectionImpl
*
This
=
impl_from_ITextSelection
(
me
);
ME_Cursor
*
start
=
NULL
,
*
end
=
NULL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pch
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
TRACE
(
"%p
\n
"
,
pch
);
if
(
!
pch
)
return
E_INVALIDARG
;
...
...
dlls/riched20/tests/richole.c
View file @
6a335ca5
...
...
@@ -683,7 +683,7 @@ static void test_ITextRange_GetChar(void)
ITextDocument
*
txtDoc
=
NULL
;
ITextRange
*
txtRge
=
NULL
;
HRESULT
hres
;
LONG
pch
=
0xdeadbeef
;
LONG
pch
;
int
first
,
lim
;
static
const
CHAR
test_text1
[]
=
"TestSomeText"
;
...
...
@@ -742,8 +742,16 @@ static void test_ITextRange_GetChar(void)
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
hres
=
ITextRange_GetChar
(
txtRge
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"ITextRange_GetChar
\n
"
);
ITextRange_Release
(
txtRge
);
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
NULL
);
hres
=
ITextRange_GetChar
(
txtRge
,
NULL
);
ok
(
hres
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hres
);
hres
=
ITextRange_GetChar
(
txtRge
,
&
pch
);
ok
(
hres
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hres
);
ITextRange_Release
(
txtRge
);
}
static
void
test_ITextSelection_GetChar
(
void
)
...
...
@@ -753,7 +761,7 @@ static void test_ITextSelection_GetChar(void)
ITextDocument
*
txtDoc
=
NULL
;
ITextSelection
*
txtSel
=
NULL
;
HRESULT
hres
;
LONG
pch
=
0xdeadbeef
;
LONG
pch
;
int
first
,
lim
;
static
const
CHAR
test_text1
[]
=
"TestSomeText"
;
...
...
@@ -791,7 +799,15 @@ static void test_ITextSelection_GetChar(void)
hres
=
ITextSelection_GetChar
(
txtSel
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"ITextSelection_GetChar
\n
"
);
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
&
txtSel
);
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
NULL
);
hres
=
ITextSelection_GetChar
(
txtSel
,
NULL
);
ok
(
hres
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hres
);
hres
=
ITextSelection_GetChar
(
txtSel
,
&
pch
);
ok
(
hres
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hres
);
ITextSelection_Release
(
txtSel
);
}
static
void
test_ITextRange_GetStart_GetEnd
(
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