#include <apitest.h>
#include <apitest_guard.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <locale.h>
Go to the source code of this file.
◆ todo_static
◆ wctomb
◆ WIN32_NO_STATUS
◆ PFN_wctomb
◆ Init()
Definition at line 24 of file wctomb.c.
25{
30}
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
static PFN_wctomb p_wctomb
int(__cdecl * PFN_wctomb)(char *mbchar, wchar_t wchar)
Referenced by START_TEST().
◆ START_TEST()
Definition at line 34 of file wctomb.c.
35{
37 char *chDest;
38 char *loc;
40 wchar_t wchSrc[2] = {
L'R', 0414};
41
42#ifndef TEST_STATIC_CRT
44 {
45 skip(
"Skipping tests, because wctomb is not available\n");
46 return;
47 }
48#endif
49
51 if (!chDest)
52 {
53 skip(
"Buffer allocation failed!\n");
54 return;
55 }
56
57
59 printf(
"The current codepage of your system tested is (%u) and locale (%s).\n\n",
codepage, loc);
60
61
63 todo_static ok(
Length == 0,
"Expected no characters to be converted (because the output argument is refused) but got %d.\n",
Length);
64
65
67 todo_static ok(
Length == 0,
"Expected no characters to be converted (because the output argument is refused) but got %d.\n",
Length);
68
69
71 ok(
errno == 0,
"The error number (errno) should be 0 even though an invalid character in current locale is given but got %d.\n",
errno);
72 todo_static ok(
Length == 0,
"Expected no characters to be converted (because the output argument is refused) but got %d.\n",
Length);
73
74
78
79
81 ok(
Length == 1,
"Expected one character to be converted (the null character) but got %d.\n",
Length);
83
84
86 ok(
Length == 1,
"Expected one character to be converted but got %d.\n",
Length);
88
90}
static VOID FreeGuarded(_In_ PVOID Pointer)
static PVOID AllocateGuarded(_In_ SIZE_T SizeRequested)
#define ok_int(expression, result)
_CRTIMP unsigned int __cdecl ___lc_codepage_func(void)
_In_ ULONG _In_ ULONG _In_ ULONG Length
◆ p_wctomb