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
ed1711ec
Commit
ed1711ec
authored
Apr 21, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Avoid using the 'long' types.
parent
5c02e3f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
file.c
dlls/ntdll/tests/file.c
+4
-4
rtlstr.c
dlls/ntdll/tests/rtlstr.c
+3
-3
string.c
dlls/ntdll/tests/string.c
+16
-16
No files found.
dlls/ntdll/tests/file.c
View file @
ed1711ec
...
...
@@ -116,7 +116,7 @@ ULONG_PTR completionKey;
IO_STATUS_BLOCK
ioSb
;
ULONG_PTR
completionValue
;
static
long
get_pending_msgs
(
HANDLE
h
)
static
ULONG
get_pending_msgs
(
HANDLE
h
)
{
NTSTATUS
res
;
ULONG
a
,
req
;
...
...
@@ -911,13 +911,13 @@ static void nt_mailslot_test(void)
static
void
test_iocp_setcompletion
(
HANDLE
h
)
{
NTSTATUS
res
;
long
count
;
ULONG
count
;
res
=
pNtSetIoCompletion
(
h
,
CKEY_FIRST
,
CVALUE_FIRST
,
STATUS_INVALID_DEVICE_REQUEST
,
3
);
ok
(
res
==
STATUS_SUCCESS
,
"NtSetIoCompletion failed: %x
\n
"
,
res
);
count
=
get_pending_msgs
(
h
);
ok
(
count
==
1
,
"Unexpected msg count: %
l
d
\n
"
,
count
);
ok
(
count
==
1
,
"Unexpected msg count: %d
\n
"
,
count
);
if
(
get_msg
(
h
))
{
...
...
@@ -928,7 +928,7 @@ static void test_iocp_setcompletion(HANDLE h)
}
count
=
get_pending_msgs
(
h
);
ok
(
!
count
,
"Unexpected msg count: %
l
d
\n
"
,
count
);
ok
(
!
count
,
"Unexpected msg count: %d
\n
"
,
count
);
}
static
void
test_iocp_fileio
(
HANDLE
h
)
...
...
dlls/ntdll/tests/rtlstr.c
View file @
ed1711ec
...
...
@@ -42,7 +42,7 @@ static VOID (WINAPI *pRtlCopyString)(STRING *, const STRING *);
static
BOOLEAN
(
WINAPI
*
pRtlCreateUnicodeString
)(
PUNICODE_STRING
,
LPCWSTR
);
static
BOOLEAN
(
WINAPI
*
pRtlCreateUnicodeStringFromAsciiz
)(
PUNICODE_STRING
,
LPCSTR
);
static
NTSTATUS
(
WINAPI
*
pRtlDowncaseUnicodeString
)(
UNICODE_STRING
*
,
const
UNICODE_STRING
*
,
BOOLEAN
);
static
NTSTATUS
(
WINAPI
*
pRtlDuplicateUnicodeString
)(
long
,
UNICODE_STRING
*
,
UNICODE_STRING
*
);
static
NTSTATUS
(
WINAPI
*
pRtlDuplicateUnicodeString
)(
int
,
UNICODE_STRING
*
,
UNICODE_STRING
*
);
static
BOOLEAN
(
WINAPI
*
pRtlEqualUnicodeString
)(
const
UNICODE_STRING
*
,
const
UNICODE_STRING
*
,
BOOLEAN
);
static
NTSTATUS
(
WINAPI
*
pRtlFindCharInUnicodeString
)(
int
,
const
UNICODE_STRING
*
,
const
UNICODE_STRING
*
,
USHORT
*
);
static
VOID
(
WINAPI
*
pRtlFreeAnsiString
)(
PSTRING
);
...
...
@@ -53,14 +53,14 @@ static VOID (WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING, LPCWSTR);
static
NTSTATUS
(
WINAPI
*
pRtlInitUnicodeStringEx
)(
PUNICODE_STRING
,
LPCWSTR
);
static
NTSTATUS
(
WINAPI
*
pRtlIntegerToChar
)(
ULONG
,
ULONG
,
ULONG
,
PCHAR
);
static
NTSTATUS
(
WINAPI
*
pRtlIntegerToUnicodeString
)(
ULONG
,
ULONG
,
UNICODE_STRING
*
);
static
NTSTATUS
(
WINAPI
*
pRtlMultiAppendUnicodeStringBuffer
)(
UNICODE_STRING
*
,
long
,
UNICODE_STRING
*
);
static
NTSTATUS
(
WINAPI
*
pRtlMultiAppendUnicodeStringBuffer
)(
UNICODE_STRING
*
,
LONG
,
UNICODE_STRING
*
);
static
NTSTATUS
(
WINAPI
*
pRtlUnicodeStringToAnsiString
)(
STRING
*
,
const
UNICODE_STRING
*
,
BOOLEAN
);
static
NTSTATUS
(
WINAPI
*
pRtlUnicodeStringToInteger
)(
const
UNICODE_STRING
*
,
int
,
int
*
);
static
WCHAR
(
WINAPI
*
pRtlUpcaseUnicodeChar
)(
WCHAR
);
static
NTSTATUS
(
WINAPI
*
pRtlUpcaseUnicodeString
)(
UNICODE_STRING
*
,
const
UNICODE_STRING
*
,
BOOLEAN
);
static
CHAR
(
WINAPI
*
pRtlUpperChar
)(
CHAR
);
static
NTSTATUS
(
WINAPI
*
pRtlUpperString
)(
STRING
*
,
const
STRING
*
);
static
NTSTATUS
(
WINAPI
*
pRtlValidateUnicodeString
)(
long
,
UNICODE_STRING
*
);
static
NTSTATUS
(
WINAPI
*
pRtlValidateUnicodeString
)(
LONG
,
UNICODE_STRING
*
);
static
NTSTATUS
(
WINAPI
*
pRtlGUIDFromString
)(
const
UNICODE_STRING
*
,
GUID
*
);
static
NTSTATUS
(
WINAPI
*
pRtlStringFromGUID
)(
const
GUID
*
,
UNICODE_STRING
*
);
static
BOOLEAN
(
WINAPI
*
pRtlIsTextUnicode
)(
LPVOID
,
INT
,
INT
*
);
...
...
dlls/ntdll/tests/string.c
View file @
ed1711ec
...
...
@@ -37,8 +37,8 @@ static int (WINAPIV *patoi)(const char *);
static
long
(
WINAPIV
*
patol
)(
const
char
*
);
static
LONGLONG
(
WINAPIV
*
p_atoi64
)(
const
char
*
);
static
LPSTR
(
WINAPIV
*
p_itoa
)(
int
,
LPSTR
,
INT
);
static
LPSTR
(
WINAPIV
*
p_ltoa
)(
long
,
LPSTR
,
INT
);
static
LPSTR
(
WINAPIV
*
p_ultoa
)(
unsigned
long
,
LPSTR
,
INT
);
static
LPSTR
(
WINAPIV
*
p_ltoa
)(
LONG
,
LPSTR
,
INT
);
static
LPSTR
(
WINAPIV
*
p_ultoa
)(
ULONG
,
LPSTR
,
INT
);
static
LPSTR
(
WINAPIV
*
p_i64toa
)(
LONGLONG
,
LPSTR
,
INT
);
static
LPSTR
(
WINAPIV
*
p_ui64toa
)(
ULONGLONG
,
LPSTR
,
INT
);
...
...
@@ -46,8 +46,8 @@ static int (WINAPIV *p_wtoi)(LPWSTR);
static
long
(
WINAPIV
*
p_wtol
)(
LPWSTR
);
static
LONGLONG
(
WINAPIV
*
p_wtoi64
)(
LPWSTR
);
static
LPWSTR
(
WINAPIV
*
p_itow
)(
int
,
LPWSTR
,
int
);
static
LPWSTR
(
WINAPIV
*
p_ltow
)(
long
,
LPWSTR
,
INT
);
static
LPWSTR
(
WINAPIV
*
p_ultow
)(
unsigned
long
,
LPWSTR
,
INT
);
static
LPWSTR
(
WINAPIV
*
p_ltow
)(
LONG
,
LPWSTR
,
INT
);
static
LPWSTR
(
WINAPIV
*
p_ultow
)(
ULONG
,
LPWSTR
,
INT
);
static
LPWSTR
(
WINAPIV
*
p_i64tow
)(
LONGLONG
,
LPWSTR
,
INT
);
static
LPWSTR
(
WINAPIV
*
p_ui64tow
)(
ULONGLONG
,
LPWSTR
,
INT
);
...
...
@@ -228,7 +228,7 @@ static void one_itoa_test(int test_num, const ulong2str_t *ulong2str)
static
void
one_ltoa_test
(
int
test_num
,
const
ulong2str_t
*
ulong2str
)
{
char
dest_str
[
LARGE_STRI_BUFFER_LENGTH
+
1
];
long
value
;
LONG
value
;
LPSTR
result
;
memset
(
dest_str
,
'-'
,
LARGE_STRI_BUFFER_LENGTH
);
...
...
@@ -236,10 +236,10 @@ static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str)
value
=
ulong2str
->
value
;
result
=
p_ltoa
(
ulong2str
->
value
,
dest_str
,
ulong2str
->
base
);
ok
(
result
==
dest_str
,
"(test %d): _ltoa(%
l
d, [out], %d) has result %p, expected: %p
\n
"
,
"(test %d): _ltoa(%d, [out], %d) has result %p, expected: %p
\n
"
,
test_num
,
value
,
ulong2str
->
base
,
result
,
dest_str
);
ok
(
memcmp
(
dest_str
,
ulong2str
->
Buffer
,
LARGE_STRI_BUFFER_LENGTH
)
==
0
,
"(test %d): _ltoa(%
l
d, [out], %d) assigns string
\"
%s
\"
, expected:
\"
%s
\"\n
"
,
"(test %d): _ltoa(%d, [out], %d) assigns string
\"
%s
\"
, expected:
\"
%s
\"\n
"
,
test_num
,
value
,
ulong2str
->
base
,
dest_str
,
ulong2str
->
Buffer
);
}
...
...
@@ -247,7 +247,7 @@ static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str)
static
void
one_ultoa_test
(
int
test_num
,
const
ulong2str_t
*
ulong2str
)
{
char
dest_str
[
LARGE_STRI_BUFFER_LENGTH
+
1
];
unsigned
long
value
;
ULONG
value
;
LPSTR
result
;
memset
(
dest_str
,
'-'
,
LARGE_STRI_BUFFER_LENGTH
);
...
...
@@ -255,10 +255,10 @@ static void one_ultoa_test(int test_num, const ulong2str_t *ulong2str)
value
=
ulong2str
->
value
;
result
=
p_ultoa
(
ulong2str
->
value
,
dest_str
,
ulong2str
->
base
);
ok
(
result
==
dest_str
,
"(test %d): _ultoa(%
l
u, [out], %d) has result %p, expected: %p
\n
"
,
"(test %d): _ultoa(%u, [out], %d) has result %p, expected: %p
\n
"
,
test_num
,
value
,
ulong2str
->
base
,
result
,
dest_str
);
ok
(
memcmp
(
dest_str
,
ulong2str
->
Buffer
,
LARGE_STRI_BUFFER_LENGTH
)
==
0
,
"(test %d): _ultoa(%
l
u, [out], %d) assigns string
\"
%s
\"
, expected:
\"
%s
\"\n
"
,
"(test %d): _ultoa(%u, [out], %d) assigns string
\"
%s
\"
, expected:
\"
%s
\"\n
"
,
test_num
,
value
,
ulong2str
->
base
,
dest_str
,
ulong2str
->
Buffer
);
}
...
...
@@ -323,7 +323,7 @@ static void one_ltow_test(int test_num, const ulong2str_t *ulong2str)
WCHAR
dest_wstr
[
LARGE_STRI_BUFFER_LENGTH
+
1
];
UNICODE_STRING
unicode_string
;
STRING
ansi_str
;
long
value
;
LONG
value
;
LPWSTR
result
;
for
(
pos
=
0
;
pos
<
LARGE_STRI_BUFFER_LENGTH
;
pos
++
)
{
...
...
@@ -343,10 +343,10 @@ static void one_ltow_test(int test_num, const ulong2str_t *ulong2str)
result
=
p_ltow
(
value
,
dest_wstr
,
ulong2str
->
base
);
pRtlUnicodeStringToAnsiString
(
&
ansi_str
,
&
unicode_string
,
1
);
ok
(
result
==
dest_wstr
,
"(test %d): _ltow(%
l
d, [out], %d) has result %p, expected: %p
\n
"
,
"(test %d): _ltow(%d, [out], %d) has result %p, expected: %p
\n
"
,
test_num
,
value
,
ulong2str
->
base
,
result
,
dest_wstr
);
ok
(
memcmp
(
dest_wstr
,
expected_wstr
,
LARGE_STRI_BUFFER_LENGTH
*
sizeof
(
WCHAR
))
==
0
,
"(test %d): _ltow(%
l
d, [out], %d) assigns string
\"
%s
\"
, expected:
\"
%s
\"\n
"
,
"(test %d): _ltow(%d, [out], %d) assigns string
\"
%s
\"
, expected:
\"
%s
\"\n
"
,
test_num
,
value
,
ulong2str
->
base
,
ansi_str
.
Buffer
,
ulong2str
->
Buffer
);
pRtlFreeAnsiString
(
&
ansi_str
);
}
...
...
@@ -359,7 +359,7 @@ static void one_ultow_test(int test_num, const ulong2str_t *ulong2str)
WCHAR
dest_wstr
[
LARGE_STRI_BUFFER_LENGTH
+
1
];
UNICODE_STRING
unicode_string
;
STRING
ansi_str
;
unsigned
long
value
;
ULONG
value
;
LPWSTR
result
;
for
(
pos
=
0
;
pos
<
LARGE_STRI_BUFFER_LENGTH
;
pos
++
)
{
...
...
@@ -379,10 +379,10 @@ static void one_ultow_test(int test_num, const ulong2str_t *ulong2str)
result
=
p_ultow
(
value
,
dest_wstr
,
ulong2str
->
base
);
pRtlUnicodeStringToAnsiString
(
&
ansi_str
,
&
unicode_string
,
1
);
ok
(
result
==
dest_wstr
,
"(test %d): _ultow(%
l
u, [out], %d) has result %p, expected: %p
\n
"
,
"(test %d): _ultow(%u, [out], %d) has result %p, expected: %p
\n
"
,
test_num
,
value
,
ulong2str
->
base
,
result
,
dest_wstr
);
ok
(
memcmp
(
dest_wstr
,
expected_wstr
,
LARGE_STRI_BUFFER_LENGTH
*
sizeof
(
WCHAR
))
==
0
,
"(test %d): _ultow(%
l
u, [out], %d) assigns string
\"
%s
\"
, expected:
\"
%s
\"\n
"
,
"(test %d): _ultow(%u, [out], %d) assigns string
\"
%s
\"
, expected:
\"
%s
\"\n
"
,
test_num
,
value
,
ulong2str
->
base
,
ansi_str
.
Buffer
,
ulong2str
->
Buffer
);
pRtlFreeAnsiString
(
&
ansi_str
);
}
...
...
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