#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.
◆ WIN32_NO_STATUS
◆ START_TEST()
Definition at line 17 of file wctomb.c.
23 wchar_t wchSrc[2] = {
L'R', 0414};
28 skip(
"Buffer allocation failed!\n");
34 printf(
"The current codepage of your system tested is (%u) and locale (%s).\n\n",
codepage, loc);
38 ok(
Length == 0,
"Expected no characters to be converted (because the output argument is refused) but got %d.\n",
Length);
42 ok(
Length == 0,
"Expected no characters to be converted (because the output argument is refused) but got %d.\n",
Length);
46 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);
47 ok(
Length == 0,
"Expected no characters to be converted (because the output argument is refused) but got %d.\n",
Length);
51 ok(
Length == -1,
"The conversion is not possible in current locale but got %d as returned value.\n",
Length);
52 ok(
errno ==
EILSEQ,
"EILSEQ is expected in an illegal sequence conversion but got %d.\n",
errno);
56 ok(
Length == 1,
"Expected one character to be converted (the null character) but got %d.\n",
Length);
61 ok(
Length == 1,
"Expected one character to be converted but got %d.\n",
Length);
_In_ ULONG _In_ ULONG _In_ ULONG Length
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)