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
b5a6ed74
Commit
b5a6ed74
authored
Jul 20, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90/tests: Added char_traits equal tests.
parent
d589d95d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
misc.c
dlls/msvcp90/tests/misc.c
+44
-0
No files found.
dlls/msvcp90/tests/misc.c
View file @
b5a6ed74
...
...
@@ -28,6 +28,10 @@ static void (__cdecl *p_char_assign)(void*, const void*);
static
void
(
__cdecl
*
p_wchar_assign
)(
void
*
,
const
void
*
);
static
void
(
__cdecl
*
p_short_assign
)(
void
*
,
const
void
*
);
static
BYTE
(
__cdecl
*
p_char_eq
)(
const
void
*
,
const
void
*
);
static
BYTE
(
__cdecl
*
p_wchar_eq
)(
const
void
*
,
const
void
*
);
static
BYTE
(
__cdecl
*
p_short_eq
)(
const
void
*
,
const
void
*
);
static
int
invalid_parameter
=
0
;
static
void
__cdecl
test_invalid_parameter_handler
(
const
wchar_t
*
expression
,
const
wchar_t
*
function
,
const
wchar_t
*
file
,
...
...
@@ -62,6 +66,10 @@ static BOOL init(void)
p_wchar_assign
=
(
void
*
)
GetProcAddress
(
msvcp
,
"?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z"
);
p_short_assign
=
(
void
*
)
GetProcAddress
(
msvcp
,
"?assign@?$char_traits@G@std@@SAXAAGABG@Z"
);
p_char_eq
=
(
void
*
)
GetProcAddress
(
msvcp
,
"?eq@?$char_traits@D@std@@SA_NABD0@Z"
);
p_wchar_eq
=
(
void
*
)
GetProcAddress
(
msvcp
,
"?eq@?$char_traits@_W@std@@SA_NAB_W0@Z"
);
p_short_eq
=
(
void
*
)
GetProcAddress
(
msvcp
,
"?eq@?$char_traits@G@std@@SA_NABG0@Z"
);
return
TRUE
;
}
...
...
@@ -93,12 +101,48 @@ static void test_assign(void)
ok
(
out
[
2
]
==
'#'
,
"out[2] = %c
\n
"
,
out
[
2
]);
}
static
void
test_equal
(
void
)
{
static
const
char
in1
[]
=
"abc"
;
static
const
char
in2
[]
=
"ab"
;
static
const
char
in3
[]
=
"a"
;
static
const
char
in4
[]
=
"b"
;
BYTE
ret
;
if
(
!
p_char_eq
||
!
p_wchar_eq
||
!
p_short_eq
)
{
win_skip
(
"equal tests skipped
\n
"
);
return
;
}
ret
=
p_char_eq
(
in1
,
in2
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
(
int
)
ret
);
ret
=
p_char_eq
(
in1
,
in3
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
(
int
)
ret
);
ret
=
p_char_eq
(
in1
,
in4
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
(
int
)
ret
);
ret
=
p_wchar_eq
(
in1
,
in2
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
(
int
)
ret
);
ret
=
p_wchar_eq
(
in1
,
in3
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
(
int
)
ret
);
ret
=
p_wchar_eq
(
in1
,
in4
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
(
int
)
ret
);
ret
=
p_short_eq
(
in1
,
in2
);
ok
(
ret
==
TRUE
,
"ret = %d
\n
"
,
(
int
)
ret
);
ret
=
p_short_eq
(
in1
,
in3
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
(
int
)
ret
);
ret
=
p_short_eq
(
in1
,
in4
);
ok
(
ret
==
FALSE
,
"ret = %d
\n
"
,
(
int
)
ret
);
}
START_TEST
(
misc
)
{
if
(
!
init
())
return
;
test_assign
();
test_equal
();
ok
(
!
invalid_parameter
,
"invalid_parameter_handler was invoked too many times
\n
"
);
}
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