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
41d01871
Commit
41d01871
authored
Jun 16, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add some IsRectEmpty() tests.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1edd0f4d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
uitools.c
dlls/user32/tests/uitools.c
+37
-0
No files found.
dlls/user32/tests/uitools.c
View file @
41d01871
...
...
@@ -146,6 +146,42 @@ static void test_EqualRect(void)
ok
(
ret
,
"got %d
\n
"
,
ret
);
}
static
void
test_IsRectEmpty
(
void
)
{
BOOL
ret
;
unsigned
int
i
;
static
const
struct
{
RECT
rect
;
BOOL
ret
;
}
rtest
[]
=
{
{{
0
,
0
,
0
,
0
},
TRUE
},
{{
127
,
131
,
127
,
131
},
TRUE
},
{{
MAXLONG
,
MAXLONG
,
MAXLONG
,
MAXLONG
},
TRUE
},
{{
-
1
,
-
1
,
-
1
,
-
1
},
TRUE
},
{{
-
2011
,
-
2017
,
-
2011
,
-
2017
},
TRUE
},
{{
MINLONG
,
MINLONG
,
MINLONG
,
MINLONG
},
TRUE
},
/* Only width or height are 0 */
{{
31
,
37
,
31
,
41
},
TRUE
},
{{
881
,
883
,
887
,
883
},
TRUE
},
{{
-
1721
,
1723
,
-
1721
,
7213
},
TRUE
},
/* Negative width and/or height */
{{
11
,
13
,
5
,
7
},
TRUE
},
{{
-
11
,
-
13
,
-
19
,
-
23
},
TRUE
},
{{
11
,
13
,
-
17
,
19
},
TRUE
},
{{
11
,
13
,
17
,
11
},
TRUE
},
/* Non emty rects */
{{
101
,
103
,
107
,
109
},
FALSE
},
{{
1
,
-
9
,
7
,
3
},
FALSE
},
{{
-
109
,
-
107
,
-
103
,
-
101
},
FALSE
},
};
for
(
i
=
0
;
i
<
sizeof
(
rtest
)
/
sizeof
(
rtest
[
0
]);
i
++
)
{
ret
=
IsRectEmpty
(
&
rtest
[
i
].
rect
);
ok
(
ret
==
rtest
[
i
].
ret
,
"Test %d: IsRectEmpty returned %s for %s
\n
"
,
i
,
ret
?
"TRUE"
:
"FALSE"
,
wine_dbgstr_rect
(
&
rtest
[
i
].
rect
));
}
}
static
void
test_SetRect
(
void
)
{
RECT
rect
;
...
...
@@ -170,5 +206,6 @@ START_TEST(uitools)
test_FillRect
();
test_SubtractRect
();
test_EqualRect
();
test_IsRectEmpty
();
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