ReactOS 0.4.15-dev-8102-g108db8f
LCMapString.c File Reference
#include "precomp.h"
Include dependency graph for LCMapString.c:

Go to the source code of this file.

Macros

#define ok_wstr(x, y)   ok_wstr_(__FILE__, __LINE__, x, y)
 

Functions

static void ok_wstr_ (const char *file, int line, LPCWSTR x, LPCWSTR y)
 
static void TEST_LCMapStringW (void)
 
 START_TEST (LCMapString)
 

Variables

static const WCHAR c_target []
 

Macro Definition Documentation

◆ ok_wstr

#define ok_wstr (   x,
  y 
)    ok_wstr_(__FILE__, __LINE__, x, y)

Definition at line 22 of file LCMapString.c.

Function Documentation

◆ ok_wstr_()

static void ok_wstr_ ( const char file,
int  line,
LPCWSTR  x,
LPCWSTR  y 
)
static

Definition at line 13 of file LCMapString.c.

14{
15 char buf1[100], buf2[100];
16 lstrcpynA(buf1, wine_dbgstr_w(x), _countof(buf1));
17 lstrcpynA(buf2, wine_dbgstr_w(y), _countof(buf2));
18 ok_(file, line)(wcscmp(x, y) == 0, "Wrong string. Expected %s, got %s\n", buf2, buf1);
19}
#define ok_(x1, x2)
Definition: atltest.h:61
#define lstrcpynA
Definition: compat.h:751
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define wine_dbgstr_w
Definition: kernel32.h:34
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define _countof(array)
Definition: sndvol32.h:70
Definition: fci.c:127
Definition: parser.c:49

◆ START_TEST()

START_TEST ( LCMapString  )

Definition at line 57 of file LCMapString.c.

58{
60}
static void TEST_LCMapStringW(void)
Definition: LCMapString.c:28

◆ TEST_LCMapStringW()

static void TEST_LCMapStringW ( void  )
static

Definition at line 28 of file LCMapString.c.

29{
30 WCHAR results[100];
31
33 ok_wstr(results, L"\xff21\xff22\xff41\xff42\xff11\xff12\xff21\xff22\xff41\xff42\xff11\xff12\x3042\x30a2\x3070\x30d0\x30d1\x4e07\x842c");
34
36 ok_wstr(results, L"ABab12ABab12\x3042\xff71\x3070\xff8a\xff9e\xff8a\xff9f\x4e07\x842c");
37
39 ok_wstr(results, L"ABab12\xff21\xff22\xff41\xff42\xff11\xff12\x3042\x3042\x3070\x3070\xff8a\xff9f\x4e07\x842c");
40
42 ok_wstr(results, L"ABab12\xff21\xff22\xff41\xff42\xff11\xff12\x30a2\x30a2\x30d0\x30d0\xff8a\xff9f\x4e07\x842c");
43
45 ok_wstr(results, L"abab12\xff41\xff42\xff41\xff42\xff11\xff12\x3042\x30a2\x3070\x30d0\xff8a\xff9f\x4e07\x842c");
46
48 ok_wstr(results, L"ABAB12\xff21\xff22\xff21\xff22\xff11\xff12\x3042\x30a2\x3070\x30d0\xff8a\xff9f\x4e07\x842c");
49
51 ok_wstr(results, L"ABab12\xff21\xff22\xff41\xff42\xff11\xff12\x3042\x30a2\x3070\x30d0\xff8a\xff9f\x4e07\x4e07");
52
54 ok_wstr(results, L"ABab12\xff21\xff22\xff41\xff42\xff11\xff12\x3042\x30a2\x3070\x30d0\xff8a\xff9f\x842c\x842c");
55}
#define ok_wstr(x, y)
Definition: LCMapString.c:22
static const WCHAR c_target[]
Definition: LCMapString.c:25
static struct _test_info results[8]
Definition: SetCursorPos.c:31
INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
Definition: locale.c:3804
#define L(x)
Definition: ntvdm.h:50
#define LCMAP_SIMPLIFIED_CHINESE
Definition: winnls.h:193
#define LCMAP_TRADITIONAL_CHINESE
Definition: winnls.h:194
#define LCMAP_HALFWIDTH
Definition: winnls.h:190
#define LCMAP_HIRAGANA
Definition: winnls.h:188
#define LCMAP_UPPERCASE
Definition: winnls.h:185
#define LCMAP_LOWERCASE
Definition: winnls.h:184
#define LCMAP_KATAKANA
Definition: winnls.h:189
#define LCMAP_FULLWIDTH
Definition: winnls.h:191
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by START_TEST().

Variable Documentation

◆ c_target

const WCHAR c_target[]
static
Initial value:
=
L"ABab12\xff21\xff22\xff41\xff42\xff11\xff12\x3042\x30a2\x3070\x30d0\xff8a\xff9f\x4e07\x842c"

Definition at line 25 of file LCMapString.c.

Referenced by TEST_LCMapStringW().