ReactOS 0.4.16-dev-1946-g52006dd
GetCPInfo.c File Reference
#include "precomp.h"
Include dependency graph for GetCPInfo.c:

Go to the source code of this file.

Functions

 START_TEST (GetCPInfo)
 

Function Documentation

◆ START_TEST()

START_TEST ( GetCPInfo  )

Definition at line 10 of file GetCPInfo.c.

11{
12 CPINFO CpInfo;
13 BOOL Ret;
14
15 Ret = GetCPInfo(CP_ACP, &CpInfo);
16 ok_int(Ret, TRUE);
17
18 memset(&CpInfo, 0xAA, sizeof(CpInfo));
19 Ret = GetCPInfo(-1, &CpInfo);
20 ok_int(Ret, FALSE);
22 ok_int(CpInfo.MaxCharSize, 0xAAAAAAAA);
23
24 memset(&CpInfo, 0xAA, sizeof(CpInfo));
25 Ret = GetCPInfo(CP_ACP, NULL);
26 ok_int(Ret, FALSE);
28 ok_int(CpInfo.MaxCharSize, 0xAAAAAAAA);
29
30 memset(&CpInfo, 0xAA, sizeof(CpInfo));
31 Ret = GetCPInfo(1361, &CpInfo);
32 ok_int(Ret, TRUE);
33 ok_int(CpInfo.MaxCharSize, 2);
34 ok_char(CpInfo.DefaultChar[0], 0x3F);
35 ok_char(CpInfo.DefaultChar[1], 0x00);
36 ok_char(CpInfo.LeadByte[0], 0x84);
37 ok_char(CpInfo.LeadByte[1], 0xD3);
38 ok_char(CpInfo.LeadByte[2], 0xD8);
39 ok_char(CpInfo.LeadByte[3], 0xDE);
40 ok_char(CpInfo.LeadByte[4], 0xE0);
41 ok_char(CpInfo.LeadByte[5], 0xF9);
42 ok_char(CpInfo.LeadByte[6], 0);
43 ok_char(CpInfo.LeadByte[7], 0);
44 ok_char(CpInfo.LeadByte[8], 0);
45 ok_char(CpInfo.LeadByte[9], 0);
46 ok_char(CpInfo.LeadByte[10], 0);
47 ok_char(CpInfo.LeadByte[11], 0);
48
49}
#define ok_char(expression, result)
Definition: atltest.h:122
#define ok_err(error)
Definition: atltest.h:124
#define ok_int(expression, result)
Definition: atltest.h:134
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:109
BOOL WINAPI GetCPInfo(UINT codepage, LPCPINFO cpinfo)
Definition: locale.c:2146
unsigned int BOOL
Definition: ntddk_ex.h:94
#define memset(x, y, z)
Definition: compat.h:39
BYTE LeadByte[MAX_LEADBYTES]
Definition: winnls.h:652
BYTE DefaultChar[MAX_DEFAULTCHAR]
Definition: winnls.h:651
UINT MaxCharSize
Definition: winnls.h:650