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
b03e800f
Commit
b03e800f
authored
Jun 28, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Avoid ARRAY_SIZE-like macros.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e070ff88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
monitor.c
dlls/user32/tests/monitor.c
+1
-2
win.c
dlls/user32/tests/win.c
+6
-9
No files found.
dlls/user32/tests/monitor.c
View file @
b03e800f
...
...
@@ -150,7 +150,6 @@ static const struct vid_mode vid_modes_test[] = {
{0, 0, 0, 0, DM_DISPLAYFREQUENCY, 0}
*/
};
#define vid_modes_cnt (sizeof(vid_modes_test) / sizeof(vid_modes_test[0]))
static
void
test_ChangeDisplaySettingsEx
(
void
)
{
...
...
@@ -237,7 +236,7 @@ static void test_ChangeDisplaySettingsEx(void)
memset
(
&
dm
,
0
,
sizeof
(
dm
));
dm
.
dmSize
=
sizeof
(
dm
);
for
(
i
=
0
;
i
<
vid_modes_cnt
;
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
vid_modes_test
)
;
i
++
)
{
dm
.
dmPelsWidth
=
vid_modes_test
[
i
].
w
;
dm
.
dmPelsHeight
=
vid_modes_test
[
i
].
h
;
...
...
dlls/user32/tests/win.c
View file @
b03e800f
...
...
@@ -84,8 +84,6 @@ static const char* szAWRClass = "Winsize";
static
HMENU
hmenu
;
static
DWORD
our_pid
;
#define COUNTOF(arr) (sizeof(arr)/sizeof(arr[0]))
static
void
dump_minmax_info
(
const
MINMAXINFO
*
minmax
)
{
trace
(
"Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d
\n
"
,
...
...
@@ -5289,9 +5287,9 @@ static void test_AWR_window_size(BOOL menu)
/* A exhaustive check of all the styles takes too long
* so just do a (hopefully representative) sample
*/
for
(
i
=
0
;
i
<
COUNTOF
(
styles
);
++
i
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
styles
);
++
i
)
test_AWRwindow
(
szAWRClass
,
styles
[
i
],
0
,
menu
);
for
(
i
=
0
;
i
<
COUNTOF
(
exStyles
);
++
i
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
exStyles
);
++
i
)
{
test_AWRwindow
(
szAWRClass
,
WS_POPUP
,
exStyles
[
i
],
menu
);
test_AWRwindow
(
szAWRClass
,
WS_THICKFRAME
,
exStyles
[
i
],
menu
);
}
...
...
@@ -5306,13 +5304,13 @@ static void test_AWR_flags(void)
DWORD
i
,
j
,
k
,
style
,
exstyle
;
RECT
rect
,
rect2
;
for
(
i
=
0
;
i
<
(
1
<<
COUNTOF
(
styles
));
i
++
)
for
(
i
=
0
;
i
<
(
1
<<
ARRAY_SIZE
(
styles
));
i
++
)
{
for
(
k
=
style
=
0
;
k
<
COUNTOF
(
styles
);
k
++
)
if
(
i
&
(
1
<<
k
))
style
|=
styles
[
k
];
for
(
k
=
style
=
0
;
k
<
ARRAY_SIZE
(
styles
);
k
++
)
if
(
i
&
(
1
<<
k
))
style
|=
styles
[
k
];
for
(
j
=
0
;
j
<
(
1
<<
COUNTOF
(
exStyles
));
j
++
)
for
(
j
=
0
;
j
<
(
1
<<
ARRAY_SIZE
(
exStyles
));
j
++
)
{
for
(
k
=
exstyle
=
0
;
k
<
COUNTOF
(
exStyles
);
k
++
)
if
(
j
&
(
1
<<
k
))
exstyle
|=
exStyles
[
k
];
for
(
k
=
exstyle
=
0
;
k
<
ARRAY_SIZE
(
exStyles
);
k
++
)
if
(
j
&
(
1
<<
k
))
exstyle
|=
exStyles
[
k
];
SetRect
(
&
rect
,
100
,
100
,
200
,
200
);
rect2
=
rect
;
AdjustWindowRectEx
(
&
rect
,
style
,
FALSE
,
exstyle
);
...
...
@@ -5329,7 +5327,6 @@ static void test_AWR_flags(void)
}
}
}
#undef COUNTOF
#define SHOWSYSMETRIC(SM) trace(#SM "=%d\n", GetSystemMetrics(SM))
...
...
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