Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
ca8d7652
Commit
ca8d7652
authored
13 years ago
by
André Zwing
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ntdll/tests: Tests for _wcslwr and _wcsupr.
parent
f7c98b03
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ntdll/tests/string.c
+28
-4
28 additions, 4 deletions
dlls/ntdll/tests/string.c
with
28 additions
and
4 deletions
dlls/ntdll/tests/string.c
+
28
−
4
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
*
pwcs
tol
)(
LP
C
WSTR
,
LPWSTR
*
,
INT
);
static
ULONG
(
WINAPIV
*
pwcs
toul
)(
LP
C
WSTR
,
LPWSTR
*
,
INT
);
static
LPWSTR
(
__cdecl
*
p
_
wcs
lwr
)(
LPWSTR
);
static
LPWSTR
(
__cdecl
*
p
_
wcs
upr
)(
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
,
"wcs
tol
"
);
pwcstoul
=
(
void
*
)
GetProcAddress
(
hntdll
,
"wcs
toul
"
);
p_wcslwr
=
(
void
*
)
GetProcAddress
(
hntdll
,
"
_
wcs
lwr
"
);
p_wcsupr
=
(
void
*
)
GetProcAddress
(
hntdll
,
"
_
wcs
upr
"
);
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment