ReactOS  0.4.15-dev-3299-gbe8e5fc
RtlxUnicodeStringToAnsiSize.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS API tests
3  * LICENSE: 0BSD (https://spdx.org/licenses/0BSD.html)
4  * PURPOSE: Test for RtlxUnicodeStringToAnsiSize
5  * COPYRIGHT: Copyright 2021 Jérôme Gardou <jerome.gardou@reactos.org>
6  */
7 
8 #include "precomp.h"
9 
10 static const struct
11 {
16 } TestData[] =
17 {
18  { 1252, 932, L"\u30c7\u30b9\u30af\u30c8\u30c3\u30d7", 7 }, /* "Desktop" in Japanese */
19  { 932, 1252, L"\u30c7\u30b9\u30af\u30c8\u30c3\u30d7", 13 }, /* "Desktop" in Japanese */
20 };
21 
23 {
24  for (int i = 0; i < _countof(TestData); i++)
25  {
27  UNICODE_STRING Ustr;
30  ok(Length == TestData[i].OemLength, "Wrong OEM length for test %u, expected %u, got %u\n",
32  }
33 }
const uint16_t * PCWSTR
Definition: typedefs.h:57
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
void SetupLocale(ULONG AnsiCode, ULONG OemCode, ULONG Unicode)
Definition: IsTextUnicode.c:38
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToAnsiSize(IN PCUNICODE_STRING UnicodeString)
Definition: unicode.c:2178
START_TEST(RtlxUnicodeStringToAnsiSize)
#define _countof(array)
Definition: sndvol32.h:68
static const WCHAR L[]
Definition: oid.c:1250
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ok(value,...)
Definition: atltest.h:57
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)