ReactOS  0.4.13-dev-961-g238ea69
wcstombs.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 wcstombs
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 LStrROS L"ReactOS"
15 #define StrROS "ReactOS"
16 
18 {
19  size_t len;
20  char out[ARRAYSIZE(StrROS)];
21 
22  len = wcstombs(NULL, LStrROS, 0);
23  ok(len == 7, "Got len = %u, excepting 7\n", len);
24  len = wcstombs(NULL, LStrROS, 0);
25  ok(len == 7, "Got len = %u, excepting 7\n", len);
27  ok(len == 7, "Got len = %u, excepting 7\n", len);
29  ok(len == 7, "Got len = %u, excepting 7\n", len);
31  ok(len == 7, "Got len = %u, excepting 7\n", len);
32  ok_str(out, StrROS);
33  memset(out, 0, sizeof(out));
35  ok(len == 7, "Got len = %u, excepting 7\n", len);
36  ok_str(out, StrROS);
37 }
#define ok_str(x, y)
Definition: atltest.h:127
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define LStrROS
Definition: wcstombs.c:14
smooth NULL
Definition: ftsmooth.c:416
static FILE * out
Definition: regtests2xml.c:44
#define StrROS
Definition: wcstombs.c:15
GLenum GLsizei len
Definition: glext.h:6722
#define ok(value,...)
Definition: atltest.h:57
size_t __cdecl wcstombs(_Out_writes_opt_z_(_MaxCount) char *_Dest, _In_z_ const wchar_t *_Source, _In_ size_t _MaxCount)
#define memset(x, y, z)
Definition: compat.h:39
START_TEST(wcstombs)
Definition: wcstombs.c:17