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
cba2c847
Commit
cba2c847
authored
Jun 13, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Don't use sizeof in ok() to avoid printf format warnings.
parent
65459cb3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
46 deletions
+41
-46
env.c
dlls/ntdll/tests/env.c
+7
-12
info.c
dlls/ntdll/tests/info.c
+22
-22
rtl.c
dlls/ntdll/tests/rtl.c
+2
-2
rtlstr.c
dlls/ntdll/tests/rtlstr.c
+10
-10
No files found.
dlls/ntdll/tests/env.c
View file @
cba2c847
...
...
@@ -105,8 +105,8 @@ static void testQuery(void)
{
case
STATUS_SUCCESS
:
pRtlMultiByteToUnicodeN
(
bn
,
sizeof
(
bn
),
NULL
,
test
->
val
,
strlen
(
test
->
val
)
+
1
);
ok
(
value
.
Length
==
strlen
(
test
->
val
)
*
sizeof
(
WCHAR
),
"Wrong length %d
/%d
for %s
\n
"
,
value
.
Length
,
strlen
(
test
->
val
)
*
sizeof
(
WCHAR
),
test
->
var
);
ok
(
value
.
Length
==
strlen
(
test
->
val
)
*
sizeof
(
WCHAR
),
"Wrong length %d for %s
\n
"
,
value
.
Length
,
test
->
var
);
ok
((
value
.
Length
==
strlen
(
test
->
val
)
*
sizeof
(
WCHAR
)
&&
memcmp
(
bv
,
bn
,
test
->
len
*
sizeof
(
WCHAR
))
==
0
)
||
lstrcmpW
(
bv
,
bn
)
==
0
,
"Wrong result for %s/%d
\n
"
,
test
->
var
,
test
->
len
);
...
...
@@ -114,8 +114,7 @@ static void testQuery(void)
break
;
case
STATUS_BUFFER_TOO_SMALL
:
ok
(
value
.
Length
==
strlen
(
test
->
val
)
*
sizeof
(
WCHAR
),
"Wrong returned length %d/%d (too small buffer) for %s
\n
"
,
value
.
Length
,
strlen
(
test
->
val
)
*
sizeof
(
WCHAR
),
test
->
var
);
"Wrong returned length %d (too small buffer) for %s
\n
"
,
value
.
Length
,
test
->
var
);
break
;
}
}
...
...
@@ -241,8 +240,7 @@ static void testExpand(void)
nts
=
pRtlExpandEnvironmentStrings_U
(
small_env
,
&
us_src
,
&
us_dst
,
&
ul
);
ok
(
ul
==
strlen
(
test
->
dst
)
*
sizeof
(
WCHAR
)
+
sizeof
(
WCHAR
),
"Wrong returned length for %s: %lu <> %u
\n
"
,
test
->
src
,
ul
,
strlen
(
test
->
dst
)
*
sizeof
(
WCHAR
)
+
sizeof
(
WCHAR
));
"Wrong returned length for %s: %lu
\n
"
,
test
->
src
,
ul
);
us_dst
.
Length
=
0
;
us_dst
.
MaximumLength
=
sizeof
(
dst
);
...
...
@@ -251,11 +249,9 @@ static void testExpand(void)
nts
=
pRtlExpandEnvironmentStrings_U
(
small_env
,
&
us_src
,
&
us_dst
,
&
ul
);
ok
(
nts
==
STATUS_SUCCESS
,
"Call failed (%lu)
\n
"
,
nts
);
ok
(
ul
==
us_dst
.
Length
+
sizeof
(
WCHAR
),
"Wrong returned length for %s: %lu <> %u
\n
"
,
test
->
src
,
ul
,
us_dst
.
Length
+
sizeof
(
WCHAR
));
"Wrong returned length for %s: %lu
\n
"
,
test
->
src
,
ul
);
ok
(
ul
==
strlen
(
test
->
dst
)
*
sizeof
(
WCHAR
)
+
sizeof
(
WCHAR
),
"Wrong returned length for %s: %lu <> %u
\n
"
,
test
->
src
,
ul
,
strlen
(
test
->
dst
)
*
sizeof
(
WCHAR
)
+
sizeof
(
WCHAR
));
"Wrong returned length for %s: %lu
\n
"
,
test
->
src
,
ul
);
ok
(
lstrcmpW
(
dst
,
rst
)
==
0
,
"Wrong result for %s: expecting %s
\n
"
,
test
->
src
,
test
->
dst
);
...
...
@@ -266,8 +262,7 @@ static void testExpand(void)
nts
=
pRtlExpandEnvironmentStrings_U
(
small_env
,
&
us_src
,
&
us_dst
,
&
ul
);
ok
(
nts
==
STATUS_BUFFER_TOO_SMALL
,
"Call failed (%lu)
\n
"
,
nts
);
ok
(
ul
==
strlen
(
test
->
dst
)
*
sizeof
(
WCHAR
)
+
sizeof
(
WCHAR
),
"Wrong returned length for %s (with buffer too small): %lu <> %u
\n
"
,
test
->
src
,
ul
,
strlen
(
test
->
dst
)
*
sizeof
(
WCHAR
)
+
sizeof
(
WCHAR
));
"Wrong returned length for %s (with buffer too small): %lu
\n
"
,
test
->
src
,
ul
);
ok
(
memcmp
(
dst
,
rst
,
8
*
sizeof
(
WCHAR
))
==
0
,
"Wrong result for %s (with buffer too small): expecting %s
\n
"
,
test
->
src
,
test
->
dst
);
...
...
dlls/ntdll/tests/info.c
View file @
cba2c847
This diff is collapsed.
Click to expand it.
dlls/ntdll/tests/rtl.c
View file @
cba2c847
...
...
@@ -786,7 +786,7 @@ static const all_accesses_t all_accesses[] = {
static
void
test_RtlAreAllAccessesGranted
(
void
)
{
size_
t
test_num
;
unsigned
in
t
test_num
;
BOOLEAN
result
;
for
(
test_num
=
0
;
test_num
<
NB_ALL_ACCESSES
;
test_num
++
)
{
...
...
@@ -823,7 +823,7 @@ static const any_accesses_t any_accesses[] = {
static
void
test_RtlAreAnyAccessesGranted
(
void
)
{
size_
t
test_num
;
unsigned
in
t
test_num
;
BOOLEAN
result
;
for
(
test_num
=
0
;
test_num
<
NB_ANY_ACCESSES
;
test_num
++
)
{
...
...
dlls/ntdll/tests/rtlstr.c
View file @
cba2c847
...
...
@@ -397,7 +397,7 @@ static void test_RtlDuplicateUnicodeString(void)
CHAR
dest_ansi_buf
[
257
];
STRING
dest_ansi_str
;
NTSTATUS
result
;
size_
t
test_num
;
unsigned
in
t
test_num
;
for
(
test_num
=
0
;
test_num
<
NB_DUPL_USTR
;
test_num
++
)
{
source_str
.
Length
=
dupl_ustr
[
test_num
].
source_Length
;
...
...
@@ -754,7 +754,7 @@ static void test_RtlUnicodeStringToAnsiString(void)
STRING
ansi_str
;
UNICODE_STRING
uni_str
;
NTSTATUS
result
;
size_
t
test_num
;
unsigned
in
t
test_num
;
for
(
test_num
=
0
;
test_num
<
NB_USTR2ASTR
;
test_num
++
)
{
ansi_str
.
Length
=
ustr2astr
[
test_num
].
ansi_Length
;
...
...
@@ -825,7 +825,7 @@ static void test_RtlAppendAsciizToString(void)
CHAR
dest_buf
[
257
];
STRING
dest_str
;
NTSTATUS
result
;
size_
t
test_num
;
unsigned
in
t
test_num
;
for
(
test_num
=
0
;
test_num
<
NB_APP_ASC2STR
;
test_num
++
)
{
dest_str
.
Length
=
app_asc2str
[
test_num
].
dest_Length
;
...
...
@@ -897,7 +897,7 @@ static void test_RtlAppendStringToString(void)
STRING
dest_str
;
STRING
src_str
;
NTSTATUS
result
;
size_
t
test_num
;
unsigned
in
t
test_num
;
for
(
test_num
=
0
;
test_num
<
NB_APP_STR2STR
;
test_num
++
)
{
dest_str
.
Length
=
app_str2str
[
test_num
].
dest_Length
;
...
...
@@ -978,7 +978,7 @@ static void test_RtlAppendUnicodeToString(void)
WCHAR
dest_buf
[
257
];
UNICODE_STRING
dest_str
;
NTSTATUS
result
;
size_
t
test_num
;
unsigned
in
t
test_num
;
for
(
test_num
=
0
;
test_num
<
NB_APP_UNI2STR
;
test_num
++
)
{
dest_str
.
Length
=
app_uni2str
[
test_num
].
dest_Length
;
...
...
@@ -1054,7 +1054,7 @@ static void test_RtlAppendUnicodeStringToString(void)
UNICODE_STRING
dest_str
;
UNICODE_STRING
src_str
;
NTSTATUS
result
;
size_
t
test_num
;
unsigned
in
t
test_num
;
for
(
test_num
=
0
;
test_num
<
NB_APP_USTR2STR
;
test_num
++
)
{
dest_str
.
Length
=
app_ustr2str
[
test_num
].
dest_Length
;
...
...
@@ -1165,8 +1165,8 @@ static void test_RtlFindCharInUnicodeString(void)
UNICODE_STRING
search_chars
;
USHORT
pos
;
NTSTATUS
result
;
size_
t
idx
;
size_
t
test_num
;
unsigned
in
t
idx
;
unsigned
in
t
test_num
;
for
(
test_num
=
0
;
test_num
<
NB_FIND_CH_IN_USTR
;
test_num
++
)
{
if
(
find_ch_in_ustr
[
test_num
].
main_str
!=
NULL
)
{
...
...
@@ -1335,7 +1335,7 @@ static const str2int_t str2int[] = {
static
void
test_RtlUnicodeStringToInteger
(
void
)
{
size_
t
test_num
;
unsigned
in
t
test_num
;
int
value
;
NTSTATUS
result
;
WCHAR
*
wstr
;
...
...
@@ -1399,7 +1399,7 @@ static void test_RtlUnicodeStringToInteger(void)
static
void
test_RtlCharToInteger
(
void
)
{
size_
t
test_num
;
unsigned
in
t
test_num
;
int
value
;
NTSTATUS
result
;
...
...
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