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
54f41ae3
Commit
54f41ae3
authored
Jun 02, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Some tests for EqualRect()/SetRect().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
73bb165b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
uitools.c
dlls/user32/tests/uitools.c
+55
-0
No files found.
dlls/user32/tests/uitools.c
View file @
54f41ae3
...
...
@@ -112,8 +112,63 @@ static void test_SubtractRect(void)
"(dest rect={%d, %d, %d, %d})
\n
"
,
rect2
.
left
,
rect2
.
top
,
rect2
.
right
,
rect2
.
bottom
);
}
static
void
test_EqualRect
(
void
)
{
RECT
rect1
,
rect2
;
BOOL
ret
;
SetRect
(
&
rect1
,
0
,
0
,
0
,
0
);
SetRect
(
&
rect2
,
1
,
1
,
1
,
1
);
ret
=
EqualRect
(
NULL
,
NULL
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ret
=
EqualRect
(
&
rect1
,
NULL
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ret
=
EqualRect
(
NULL
,
&
rect2
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ret
=
EqualRect
(
&
rect1
,
&
rect2
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
SetRect
(
&
rect1
,
0
,
0
,
10
,
10
);
SetRect
(
&
rect2
,
10
,
10
,
0
,
0
);
ret
=
EqualRect
(
&
rect1
,
&
rect2
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ret
=
EqualRect
(
&
rect1
,
&
rect1
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
rect2
=
rect1
;
ret
=
EqualRect
(
&
rect1
,
&
rect2
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
}
static
void
test_SetRect
(
void
)
{
RECT
rect
;
BOOL
ret
;
ret
=
SetRect
(
NULL
,
0
,
0
,
0
,
0
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ret
=
SetRect
(
&
rect
,
1
,
2
,
3
,
4
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
ok
(
rect
.
left
==
1
&&
rect
.
top
==
2
&&
rect
.
right
==
3
&&
rect
.
bottom
==
4
,
"got wrong rectangle
\n
"
);
ret
=
SetRect
(
&
rect
,
10
,
10
,
5
,
5
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
ok
(
rect
.
left
==
10
&&
rect
.
top
==
10
&&
rect
.
right
==
5
&&
rect
.
bottom
==
5
,
"got wrong rectangle
\n
"
);
}
START_TEST
(
uitools
)
{
test_FillRect
();
test_SubtractRect
();
test_EqualRect
();
test_SetRect
();
}
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