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
ee5c64f5
Commit
ee5c64f5
authored
Mar 26, 2014
by
Javier Cantero
Committed by
Alexandre Julliard
Mar 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: New test cases for SubtractRect().
parent
5b555630
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
uitools.c
dlls/user32/tests/uitools.c
+19
-3
No files found.
dlls/user32/tests/uitools.c
View file @
ee5c64f5
...
...
@@ -70,7 +70,7 @@ static void test_SubtractRect(void)
RECT
rectr
;
BOOL
result
;
/*
case 1:
source rectangles don't intersect */
/* source rectangles don't intersect */
SetRect
(
&
rect1
,
50
,
50
,
150
,
100
);
SetRect
(
&
rect2
,
250
,
200
,
1500
,
1000
);
result
=
SubtractRect
(
&
rectr
,
&
rect1
,
&
rect2
);
...
...
@@ -79,7 +79,7 @@ static void test_SubtractRect(void)
&&
rectr
.
bottom
==
100
,
"wrong rect subtraction of SubtractRect "
"(dest rect={%d, %d, %d, %d})
\n
"
,
rectr
.
left
,
rectr
.
top
,
rectr
.
right
,
rectr
.
bottom
);
/*
case 2:
source rect 2 partially overlaps rect 1 */
/* source rect 2 partially overlaps rect 1 */
SetRect
(
&
rect1
,
2431
,
626
,
3427
,
1608
);
SetRect
(
&
rect2
,
2499
,
626
,
3427
,
1608
);
result
=
SubtractRect
(
&
rectr
,
&
rect1
,
&
rect2
);
...
...
@@ -88,12 +88,28 @@ static void test_SubtractRect(void)
&&
rectr
.
bottom
==
1608
,
"wrong rect subtraction of SubtractRect "
"(dest rect={%d, %d, %d, %d})
\n
"
,
rectr
.
left
,
rectr
.
top
,
rectr
.
right
,
rectr
.
bottom
);
/* case 3: source rect 2 completely overlaps rect 1 */
/* source rect 2 partially overlaps rect 1 - dest is src rect 2 */
SetRect
(
&
rect1
,
2431
,
626
,
3427
,
1608
);
SetRect
(
&
rect2
,
2499
,
626
,
3427
,
1608
);
result
=
SubtractRect
(
&
rect2
,
&
rect1
,
&
rect2
);
ok
(
result
,
"SubtractRect returned FALSE but subtraction should not be empty
\n
"
);
ok
(
result
&&
rectr
.
left
==
2431
&&
rectr
.
top
==
626
&&
rectr
.
right
==
2499
&&
rectr
.
bottom
==
1608
,
"wrong rect subtraction of SubtractRect "
"(dest rect={%d, %d, %d, %d})
\n
"
,
rectr
.
left
,
rectr
.
top
,
rectr
.
right
,
rectr
.
bottom
);
/* source rect 2 completely overlaps rect 1 */
SetRect
(
&
rect1
,
250
,
250
,
400
,
500
);
SetRect
(
&
rect2
,
50
,
50
,
1500
,
1000
);
result
=
SubtractRect
(
&
rectr
,
&
rect1
,
&
rect2
);
ok
(
!
result
,
"SubtractRect returned TRUE but subtraction should be empty "
"(dest rect={%d, %d, %d, %d})
\n
"
,
rectr
.
left
,
rectr
.
top
,
rectr
.
right
,
rectr
.
bottom
);
/* source rect 2 completely overlaps rect 1 - dest is src rect 2 */
SetRect
(
&
rect1
,
250
,
250
,
400
,
500
);
SetRect
(
&
rect2
,
50
,
50
,
1500
,
1000
);
result
=
SubtractRect
(
&
rect2
,
&
rect1
,
&
rect2
);
ok
(
!
result
,
"SubtractRect returned TRUE but subtraction should be empty "
"(dest rect={%d, %d, %d, %d})
\n
"
,
rect2
.
left
,
rect2
.
top
,
rect2
.
right
,
rect2
.
bottom
);
}
START_TEST
(
uitools
)
...
...
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