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
95074af8
Commit
95074af8
authored
May 24, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20/tests: Basic test for Delete().
parent
b43a0e11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
richole.c
dlls/riched20/tests/richole.c
+47
-0
No files found.
dlls/riched20/tests/richole.c
View file @
95074af8
...
...
@@ -1880,6 +1880,52 @@ static void test_ITextFont(void)
ITextFont_Release
(
font
);
}
static
void
test_Delete
(
void
)
{
static
const
CHAR
test_text1
[]
=
"TestSomeText"
;
IRichEditOle
*
reOle
=
NULL
;
ITextDocument
*
doc
=
NULL
;
ITextRange
*
range
,
*
range2
;
LONG
value
;
HRESULT
hr
;
HWND
hwnd
;
create_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
test_text1
);
hr
=
ITextDocument_Range
(
doc
,
0
,
4
,
&
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextDocument_Range
(
doc
,
1
,
2
,
&
range2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextRange_GetEnd
(
range
,
&
value
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
value
==
4
,
"got %d
\n
"
,
value
);
hr
=
ITextRange_Delete
(
range2
,
tomCharacter
,
0
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextRange_GetEnd
(
range
,
&
value
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
value
==
3
,
"got %d
\n
"
,
value
);
hr
=
ITextRange_GetStart
(
range2
,
&
value
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
value
==
1
,
"got %d
\n
"
,
value
);
hr
=
ITextRange_GetEnd
(
range2
,
&
value
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
value
==
1
,
"got %d
\n
"
,
value
);
ITextRange_Release
(
range
);
ITextRange_Release
(
range2
);
release_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
}
START_TEST
(
richole
)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
...
...
@@ -1905,4 +1951,5 @@ START_TEST(richole)
test_GetPara
();
test_dispatch
();
test_ITextFont
();
test_Delete
();
}
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