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
6a04cf4a
Commit
6a04cf4a
authored
Jun 27, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Avoid ARRAY_SIZE-like macros.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
20b43a9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
comm.c
dlls/kernel32/tests/comm.c
+1
-3
toolhelp.c
dlls/kernel32/tests/toolhelp.c
+3
-5
No files found.
dlls/kernel32/tests/comm.c
View file @
6a04cf4a
...
...
@@ -410,8 +410,6 @@ static const TEST test[] =
},
};
#define TEST_COUNT (sizeof(test) / sizeof(TEST))
/* This function can be useful if you are modifying the test cases and want to
output the contents of a DCB structure. */
/*static print_dcb(DCB *pdcb)
...
...
@@ -656,7 +654,7 @@ static void test_BuildCommDCB(void)
if
(
!
port
)
trace
(
"Could not find a valid COM port. Some tests will be skipped.
\n
"
);
for
(
i
=
0
;
i
<
TEST_COUNT
;
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
test
)
;
i
++
)
{
char
string
[
sizeof
(
test
[
i
].
string
)];
...
...
dlls/kernel32/tests/toolhelp.c
View file @
6a04cf4a
...
...
@@ -217,8 +217,6 @@ static const char* sub_expected_modules[] =
"ntdll.dll"
};
#define NUM_OF(x) (sizeof(x) / sizeof(x[0]))
static
void
test_module
(
DWORD
pid
,
const
char
*
expected
[],
unsigned
num_expected
)
{
HANDLE
hSnapshot
;
...
...
@@ -229,7 +227,7 @@ static void test_module(DWORD pid, const char* expected[], unsigned num_expected
unsigned
i
;
int
num
=
0
;
ok
(
NUM_OF
(
found
)
>=
num_expected
,
"Internal: bump found[] size
\n
"
);
ok
(
ARRAY_SIZE
(
found
)
>=
num_expected
,
"Internal: bump found[] size
\n
"
);
hSnapshot
=
pCreateToolhelp32Snapshot
(
TH32CS_SNAPMODULE
,
pid
);
ok
(
hSnapshot
!=
NULL
,
"Cannot create snapshot
\n
"
);
...
...
@@ -341,8 +339,8 @@ START_TEST(toolhelp)
test_process
(
pid
,
info
.
dwProcessId
);
test_thread
(
pid
,
info
.
dwProcessId
);
test_module
(
pid
,
curr_expected_modules
,
NUM_OF
(
curr_expected_modules
));
test_module
(
info
.
dwProcessId
,
sub_expected_modules
,
NUM_OF
(
sub_expected_modules
));
test_module
(
pid
,
curr_expected_modules
,
ARRAY_SIZE
(
curr_expected_modules
));
test_module
(
info
.
dwProcessId
,
sub_expected_modules
,
ARRAY_SIZE
(
sub_expected_modules
));
SetEvent
(
ev2
);
winetest_wait_child_process
(
info
.
hProcess
);
...
...
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