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
13ab99b4
Commit
13ab99b4
authored
May 02, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Avoid strlen in traces.
parent
0a4eebd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
16 deletions
+8
-16
editor.c
dlls/riched20/tests/editor.c
+4
-8
editor.c
dlls/riched32/tests/editor.c
+4
-8
No files found.
dlls/riched20/tests/editor.c
View file @
13ab99b4
...
...
@@ -829,8 +829,7 @@ static void test_EM_GETTEXTRANGE(void)
textRange
.
chrg
.
cpMin
=
4
;
textRange
.
chrg
.
cpMax
=
11
;
result
=
SendMessage
(
hwndRichEdit
,
EM_GETTEXTRANGE
,
0
,
(
LPARAM
)
&
textRange
);
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld, expected %d
\n
"
,
result
,
strlen
(
expect
));
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld
\n
"
,
result
);
ok
(
!
strcmp
(
expect
,
buffer
),
"EM_GETTEXTRANGE filled %s
\n
"
,
buffer
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text2
);
...
...
@@ -839,8 +838,7 @@ static void test_EM_GETTEXTRANGE(void)
textRange
.
chrg
.
cpMin
=
4
;
textRange
.
chrg
.
cpMax
=
11
;
result
=
SendMessage
(
hwndRichEdit
,
EM_GETTEXTRANGE
,
0
,
(
LPARAM
)
&
textRange
);
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld, expected %d
\n
"
,
result
,
strlen
(
expect
));
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld
\n
"
,
result
);
ok
(
!
strcmp
(
expect
,
buffer
),
"EM_GETTEXTRANGE filled %s
\n
"
,
buffer
);
DestroyWindow
(
hwndRichEdit
);
...
...
@@ -859,16 +857,14 @@ static void test_EM_GETSELTEXT(void)
SendMessage
(
hwndRichEdit
,
EM_SETSEL
,
4
,
11
);
result
=
SendMessage
(
hwndRichEdit
,
EM_GETSELTEXT
,
0
,
(
LPARAM
)
buffer
);
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld, expected %d
\n
"
,
result
,
strlen
(
expect
));
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld
\n
"
,
result
);
ok
(
!
strcmp
(
expect
,
buffer
),
"EM_GETTEXTRANGE filled %s
\n
"
,
buffer
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text2
);
SendMessage
(
hwndRichEdit
,
EM_SETSEL
,
4
,
11
);
result
=
SendMessage
(
hwndRichEdit
,
EM_GETSELTEXT
,
0
,
(
LPARAM
)
buffer
);
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld, expected %d
\n
"
,
result
,
strlen
(
expect
));
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld
\n
"
,
result
);
ok
(
!
strcmp
(
expect
,
buffer
),
"EM_GETTEXTRANGE filled %s
\n
"
,
buffer
);
DestroyWindow
(
hwndRichEdit
);
...
...
dlls/riched32/tests/editor.c
View file @
13ab99b4
...
...
@@ -489,8 +489,7 @@ static void test_EM_GETTEXTRANGE(void)
textRange
.
chrg
.
cpMin
=
4
;
textRange
.
chrg
.
cpMax
=
12
;
result
=
SendMessage
(
hwndRichEdit
,
EM_GETTEXTRANGE
,
0
,
(
LPARAM
)
&
textRange
);
ok
(
result
==
8
,
"EM_GETTEXTRANGE returned %ld, expected %d
\n
"
,
result
,
strlen
(
expect1
));
ok
(
result
==
8
,
"EM_GETTEXTRANGE returned %ld
\n
"
,
result
);
ok
(
!
strcmp
(
expect1
,
buffer
),
"EM_GETTEXTRANGE filled %s
\n
"
,
buffer
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text2
);
...
...
@@ -499,8 +498,7 @@ static void test_EM_GETTEXTRANGE(void)
textRange
.
chrg
.
cpMin
=
4
;
textRange
.
chrg
.
cpMax
=
11
;
result
=
SendMessage
(
hwndRichEdit
,
EM_GETTEXTRANGE
,
0
,
(
LPARAM
)
&
textRange
);
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld, expected %d
\n
"
,
result
,
strlen
(
expect2
));
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld
\n
"
,
result
);
ok
(
!
strcmp
(
expect2
,
buffer
),
"EM_GETTEXTRANGE filled %s
\n
"
,
buffer
);
...
...
@@ -522,16 +520,14 @@ static void test_EM_GETSELTEXT(void)
SendMessage
(
hwndRichEdit
,
EM_SETSEL
,
4
,
12
);
result
=
SendMessage
(
hwndRichEdit
,
EM_GETSELTEXT
,
0
,
(
LPARAM
)
buffer
);
ok
(
result
==
8
,
"EM_GETTEXTRANGE returned %ld, expected %d
\n
"
,
result
,
strlen
(
expect1
));
ok
(
result
==
8
,
"EM_GETTEXTRANGE returned %ld
\n
"
,
result
);
ok
(
!
strcmp
(
expect1
,
buffer
),
"EM_GETTEXTRANGE filled %s
\n
"
,
buffer
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text2
);
SendMessage
(
hwndRichEdit
,
EM_SETSEL
,
4
,
11
);
result
=
SendMessage
(
hwndRichEdit
,
EM_GETSELTEXT
,
0
,
(
LPARAM
)
buffer
);
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld, expected %d
\n
"
,
result
,
strlen
(
expect2
));
ok
(
result
==
7
,
"EM_GETTEXTRANGE returned %ld
\n
"
,
result
);
ok
(
!
strcmp
(
expect2
,
buffer
),
"EM_GETTEXTRANGE filled %s
\n
"
,
buffer
);
...
...
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