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
ca8d7652
Commit
ca8d7652
authored
Sep 07, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Sep 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Tests for _wcslwr and _wcsupr.
parent
f7c98b03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
string.c
dlls/ntdll/tests/string.c
+28
-4
No files found.
dlls/ntdll/tests/string.c
View file @
ca8d7652
...
...
@@ -51,8 +51,8 @@ static LPWSTR (WINAPIV *p_ultow)(ULONG, LPWSTR, INT);
static
LPWSTR
(
WINAPIV
*
p_i64tow
)(
LONGLONG
,
LPWSTR
,
INT
);
static
LPWSTR
(
WINAPIV
*
p_ui64tow
)(
ULONGLONG
,
LPWSTR
,
INT
);
static
long
(
WINAPIV
*
pwcstol
)(
LPCWSTR
,
LPWSTR
*
,
INT
);
static
ULONG
(
WINAPIV
*
pwcstoul
)(
LPCWSTR
,
LPWSTR
*
,
INT
);
static
LPWSTR
(
__cdecl
*
p_wcslwr
)(
LPWSTR
);
static
LPWSTR
(
__cdecl
*
p_wcsupr
)(
LPWSTR
);
static
LPWSTR
(
WINAPIV
*
p_wcschr
)(
LPCWSTR
,
WCHAR
);
static
LPWSTR
(
WINAPIV
*
p_wcsrchr
)(
LPCWSTR
,
WCHAR
);
...
...
@@ -89,8 +89,8 @@ static void InitFunctionPtrs(void)
p_i64tow
=
(
void
*
)
GetProcAddress
(
hntdll
,
"_i64tow"
);
p_ui64tow
=
(
void
*
)
GetProcAddress
(
hntdll
,
"_ui64tow"
);
pwcstol
=
(
void
*
)
GetProcAddress
(
hntdll
,
"wcstol
"
);
pwcstoul
=
(
void
*
)
GetProcAddress
(
hntdll
,
"wcstoul
"
);
p_wcslwr
=
(
void
*
)
GetProcAddress
(
hntdll
,
"_wcslwr
"
);
p_wcsupr
=
(
void
*
)
GetProcAddress
(
hntdll
,
"_wcsupr
"
);
p_wcschr
=
(
void
*
)
GetProcAddress
(
hntdll
,
"wcschr"
);
p_wcsrchr
=
(
void
*
)
GetProcAddress
(
hntdll
,
"wcsrchr"
);
...
...
@@ -1143,6 +1143,28 @@ static void test_wcsrchr(void)
"wcsrchr should have returned NULL
\n
"
);
}
static
void
test_wcslwrupr
(
void
)
{
static
WCHAR
teststringW
[]
=
{
'a'
,
'b'
,
'r'
,
'a'
,
'c'
,
'a'
,
'd'
,
'a'
,
'b'
,
'r'
,
'a'
,
0
};
static
WCHAR
emptyW
[
1
]
=
{
0
};
static
const
WCHAR
constemptyW
[
1
]
=
{
0
};
if
(
0
)
/* crashes on native */
{
static
const
WCHAR
conststringW
[]
=
{
'a'
,
'b'
,
'r'
,
'a'
,
'c'
,
'a'
,
'd'
,
'a'
,
'b'
,
'r'
,
'a'
,
0
};
ok
(
p_wcslwr
((
LPWSTR
)
conststringW
)
==
conststringW
,
"p_wcslwr returned different string
\n
"
);
ok
(
p_wcsupr
((
LPWSTR
)
conststringW
)
==
conststringW
,
"p_wcsupr returned different string
\n
"
);
ok
(
p_wcslwr
(
NULL
)
==
NULL
,
"p_wcslwr didn't returned NULL
\n
"
);
ok
(
p_wcsupr
(
NULL
)
==
NULL
,
"p_wcsupr didn't returned NULL
\n
"
);
}
ok
(
p_wcslwr
(
teststringW
)
==
teststringW
,
"p_wcslwr returned different string
\n
"
);
ok
(
p_wcsupr
(
teststringW
)
==
teststringW
,
"p_wcsupr returned different string
\n
"
);
ok
(
p_wcslwr
(
emptyW
)
==
emptyW
,
"p_wcslwr returned different string
\n
"
);
ok
(
p_wcsupr
(
emptyW
)
==
emptyW
,
"p_wcsupr returned different string
\n
"
);
ok
(
p_wcslwr
((
LPWSTR
)
constemptyW
)
==
constemptyW
,
"p_wcslwr returned different string
\n
"
);
ok
(
p_wcsupr
((
LPWSTR
)
constemptyW
)
==
constemptyW
,
"p_wcsupr returned different string
\n
"
);
}
static
__cdecl
int
intcomparefunc
(
const
void
*
a
,
const
void
*
b
)
{
const
int
*
p
=
a
,
*
q
=
b
;
...
...
@@ -1272,6 +1294,8 @@ START_TEST(string)
test_wcschr
();
if
(
p_wcsrchr
)
test_wcsrchr
();
if
(
p_wcslwr
&&
p_wcsupr
)
test_wcslwrupr
();
if
(
patoi
)
test_atoi
();
if
(
patol
)
...
...
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