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
b0104692
Commit
b0104692
authored
Jun 02, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20/tests: Use EqualRect() instead of open coding it.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
943b376d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
40 deletions
+14
-40
editor.c
dlls/riched20/tests/editor.c
+14
-40
No files found.
dlls/riched20/tests/editor.c
View file @
b0104692
...
...
@@ -7050,9 +7050,7 @@ static void test_format_rect(void)
expected
.
left
+=
1
;
expected
.
right
-=
1
;
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7071,8 +7069,7 @@ static void test_format_rect(void)
expected
.
bottom
=
min
(
clientRect
.
bottom
,
rc
.
bottom
);
expected
.
right
=
min
(
clientRect
.
right
,
rc
.
right
);
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"[n=%d] rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
n
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7082,9 +7079,7 @@ static void test_format_rect(void)
SendMessageA
(
hwnd
,
EM_SETRECT
,
0
,
(
LPARAM
)
&
rc
);
expected
=
clientRect
;
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7094,9 +7089,7 @@ static void test_format_rect(void)
ok
(
options
&
ECO_SELECTIONBAR
,
"EM_SETOPTIONS failed to add selectionbar.
\n
"
);
expected
.
left
+=
8
;
/* selection bar width */
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7104,9 +7097,7 @@ static void test_format_rect(void)
SendMessageA
(
hwnd
,
EM_SETRECT
,
0
,
(
LPARAM
)
&
rc
);
expected
=
clientRect
;
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7117,9 +7108,7 @@ static void test_format_rect(void)
ok
(
!
(
options
&
ECO_SELECTIONBAR
),
"EM_SETOPTIONS failed to remove selectionbar.
\n
"
);
expected
.
left
-=
8
;
/* selection bar width */
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7128,8 +7117,7 @@ static void test_format_rect(void)
SendMessageA
(
hwnd
,
EM_SETRECT
,
0
,
(
LPARAM
)
&
rc
);
expected
=
clientRect
;
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"[n=%d] rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
n
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7144,9 +7132,7 @@ static void test_format_rect(void)
expected
=
rc
;
SendMessageA
(
hwnd
,
EM_SETRECT
,
1
,
(
LPARAM
)
&
rc
);
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7159,9 +7145,7 @@ static void test_format_rect(void)
expected
=
rc
;
SendMessageA
(
hwnd
,
EM_SETRECT
,
1
,
(
LPARAM
)
&
rc
);
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7176,9 +7160,7 @@ static void test_format_rect(void)
expected
.
left
+=
1
;
expected
.
right
-=
1
;
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7189,9 +7171,7 @@ static void test_format_rect(void)
expected
.
left
+=
1
;
expected
.
right
-=
1
;
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7202,9 +7182,7 @@ static void test_format_rect(void)
expected
.
left
+=
1
;
expected
.
right
-=
1
;
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7223,9 +7201,7 @@ static void test_format_rect(void)
expected
.
top
+=
1
;
expected
.
right
-=
1
;
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
@@ -7240,9 +7216,7 @@ static void test_format_rect(void)
expected
.
right
+=
1
;
SendMessageA
(
hwnd
,
EM_SETRECT
,
0
,
(
LPARAM
)
&
rc
);
SendMessageA
(
hwnd
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
rc
);
ok
(
rc
.
top
==
expected
.
top
&&
rc
.
left
==
expected
.
left
&&
rc
.
bottom
==
expected
.
bottom
&&
rc
.
right
==
expected
.
right
,
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
ok
(
EqualRect
(
&
rc
,
&
expected
),
"rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)
\n
"
,
rc
.
top
,
rc
.
left
,
rc
.
bottom
,
rc
.
right
,
expected
.
top
,
expected
.
left
,
expected
.
bottom
,
expected
.
right
);
...
...
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