ReactOS
0.4.16-dev-125-g798ea90
mbstowcs.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS api tests
3
* LICENSE: GPL - See COPYING in the top level directory
4
* PURPOSE: Test for mbstowcs
5
*/
6
7
#include <
apitest.h
>
8
9
#define WIN32_NO_STATUS
10
#include <stdio.h>
11
#include <stdlib.h>
12
#include <
specstrings.h
>
13
14
#define StrROS "ReactOS"
15
#define LStrROS L"ReactOS"
16
17
START_TEST
(
mbstowcs
)
18
{
19
size_t
len
;
20
wchar_t
out
[
ARRAYSIZE
(
LStrROS
)];
21
22
len
=
mbstowcs
(
NULL
,
StrROS
, 0);
23
ok
(
len
== 7,
"Got len = %u, excepting 7\n"
,
len
);
24
len
=
mbstowcs
(
NULL
,
StrROS
, 0);
25
ok
(
len
== 7,
"Got len = %u, excepting 7\n"
,
len
);
26
len
=
mbstowcs
(
NULL
,
StrROS
,
ARRAYSIZE
(
out
));
27
ok
(
len
== 7,
"Got len = %u, excepting 7\n"
,
len
);
28
len
=
mbstowcs
(
NULL
,
StrROS
,
ARRAYSIZE
(
out
));
29
ok
(
len
== 7,
"Got len = %u, excepting 7\n"
,
len
);
30
len
=
mbstowcs
(
out
,
StrROS
,
ARRAYSIZE
(
out
));
31
ok
(
len
== 7,
"Got len = %u, excepting 7\n"
,
len
);
32
ok_wstr
(
out
,
LStrROS
);
33
memset
(
out
, 0,
sizeof
(
out
));
34
len
=
mbstowcs
(
out
,
StrROS
,
ARRAYSIZE
(
out
));
35
ok
(
len
== 7,
"Got len = %u, excepting 7\n"
,
len
);
36
ok_wstr
(
out
,
LStrROS
);
37
}
apitest.h
ok
#define ok(value,...)
Definition:
atltest.h:57
ok_wstr
#define ok_wstr(x, y)
Definition:
atltest.h:130
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
NULL
#define NULL
Definition:
types.h:112
ARRAYSIZE
#define ARRAYSIZE(array)
Definition:
filtermapper.c:47
len
GLenum GLsizei len
Definition:
glext.h:6722
mbstowcs
size_t __cdecl mbstowcs(_Out_writes_opt_z_(_MaxCount) wchar_t *_Dest, _In_z_ const char *_Source, _In_ size_t _MaxCount)
StrROS
#define StrROS
Definition:
mbstowcs.c:14
LStrROS
#define LStrROS
Definition:
mbstowcs.c:15
out
static FILE * out
Definition:
regtests2xml.c:44
memset
#define memset(x, y, z)
Definition:
compat.h:39
specstrings.h
modules
rostests
apitests
crt
mbstowcs.c
Generated on Mon Oct 14 2024 06:13:18 for ReactOS by
1.9.6