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
3a74fd3f
Commit
3a74fd3f
authored
Mar 03, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use SetRectEmpty() instead of open coding it.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d4920113
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
text.c
dlls/user32/tests/text.c
+5
-5
win.c
dlls/user32/tests/win.c
+4
-4
No files found.
dlls/user32/tests/text.c
View file @
3a74fd3f
...
...
@@ -315,16 +315,16 @@ static void test_DrawTextCalcRect(void)
dtp
.
cbSize
=
sizeof
(
dtp
);
dtp
.
iLeftMargin
=
0
;
dtp
.
iRightMargin
=
0
;
SetRect
(
&
rect
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
rect
);
DrawTextExA
(
hdc
,
text
,
-
1
,
&
rect
,
DT_CALCRECT
,
&
dtp
);
textlen
=
rect
.
right
;
/* Width without margin */
dtp
.
iLeftMargin
=
8
;
SetRect
(
&
rect
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
rect
);
DrawTextExA
(
hdc
,
text
,
-
1
,
&
rect
,
DT_CALCRECT
,
&
dtp
);
ok
(
rect
.
right
==
dtp
.
iLeftMargin
+
textlen
,
"Incorrect left margin calculated rc(%d,%d)
\n
"
,
rect
.
left
,
rect
.
right
);
dtp
.
iLeftMargin
=
0
;
dtp
.
iRightMargin
=
8
;
SetRect
(
&
rect
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
rect
);
DrawTextExA
(
hdc
,
text
,
-
1
,
&
rect
,
DT_CALCRECT
,
&
dtp
);
ok
(
rect
.
right
==
dtp
.
iRightMargin
+
textlen
,
"Incorrect right margin calculated rc(%d,%d)
\n
"
,
rect
.
left
,
rect
.
right
);
...
...
@@ -535,7 +535,7 @@ static void test_DrawTextCalcRect(void)
}
/* More test cases from bug 12226 */
SetRect
(
&
rect
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
rect
);
textheight
=
DrawTextA
(
hdc
,
emptystring
,
-
1
,
&
rect
,
DT_CALCRECT
|
DT_LEFT
|
DT_SINGLELINE
);
ok
(
textheight
,
"DrawTextA error %u
\n
"
,
GetLastError
());
ok
(
0
==
rect
.
left
,
"expected 0, got %d
\n
"
,
rect
.
left
);
...
...
@@ -543,7 +543,7 @@ static void test_DrawTextCalcRect(void)
ok
(
0
==
rect
.
top
,
"expected 0, got %d
\n
"
,
rect
.
top
);
ok
(
rect
.
bottom
,
"rect.bottom should not be 0
\n
"
);
SetRect
(
&
rect
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
rect
);
textheight
=
DrawTextW
(
hdc
,
emptystringW
,
-
1
,
&
rect
,
DT_CALCRECT
|
DT_LEFT
|
DT_SINGLELINE
);
if
(
!
textheight
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
...
...
dlls/user32/tests/win.c
View file @
3a74fd3f
...
...
@@ -5687,7 +5687,7 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
expected_cx
=
expected_cy
=
-
10
;
SetRect
(
&
expected_rect
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
expected_rect
);
SetRect
(
&
broken_rect
,
0
,
0
,
-
10
,
-
10
);
hwnd
=
CreateWindowExA
(
0
,
"Sizes_WndClass"
,
NULL
,
WS_CHILD
,
-
20
,
-
20
,
-
10
,
-
10
,
parent
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"creation failed err %u
\n
"
,
GetLastError
());
...
...
@@ -5697,7 +5697,7 @@ static void test_CreateWindow(void)
DestroyWindow
(
hwnd
);
expected_cx
=
expected_cy
=
-
200000
;
SetRect
(
&
expected_rect
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
expected_rect
);
SetRect
(
&
broken_rect
,
0
,
0
,
-
200000
,
-
200000
);
hwnd
=
CreateWindowExA
(
0
,
"Sizes_WndClass"
,
NULL
,
WS_CHILD
,
-
300000
,
-
300000
,
-
200000
,
-
200000
,
parent
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"creation failed err %u
\n
"
,
GetLastError
());
...
...
@@ -6249,7 +6249,7 @@ static void test_GetUpdateRect(void)
flush_events
(
TRUE
);
ShowWindow
(
hchild
,
SW_HIDE
);
SetRect
(
&
rc2
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
rc2
);
ret
=
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
ok
(
!
ret
,
"GetUpdateRect returned not empty region
\n
"
);
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
...
...
@@ -6313,7 +6313,7 @@ static void test_GetUpdateRect(void)
ShowWindow
(
hchild
,
SW_HIDE
);
SetRect
(
&
rc2
,
0
,
0
,
0
,
0
);
SetRect
Empty
(
&
rc2
);
ret
=
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
ok
(
!
ret
,
"GetUpdateRect returned not empty region
\n
"
);
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
...
...
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