ReactOS 0.4.17-dev-37-g0bfb40d
LocaleTests.cpp File Reference
#include "interop.h"
#include <winnls.h>
#include <strsafe.h>
#include <shlwapi.h>
#include <set>
#include <map>
Include dependency graph for LocaleTests.cpp:

Go to the source code of this file.

Classes

struct  PART_TEST
 
struct  PART
 
struct  PART_MATCH
 
struct  PART_PAIR
 

Macros

#define ADD_LIB(eModule, pszPath)   lib.insert(std::make_pair(eModule, pszPath))
 

Typedefs

typedef struct PART_TEST PART_TEST
 
typedef struct PART PART
 
typedef struct PART_MATCH PART_MATCH
 

Enumerations

enum  E_MODULE { shell32 , userenv , syssetup , mmsys }
 
enum  E_STRING {
  SH32_PROGRAMS , SH32_STARTUP , SH32_STARTMENU , SH32_PROGRAM_FILES ,
  SH32_PROGRAM_FILES_COMMON , SH32_ADMINTOOLS , UENV_STARTMENU , UENV_PROGRAMS ,
  UENV_STARTUP , SYSS_PROGRAMFILES , SYSS_COMMONFILES , MMSY_STARTMENU
}
 

Functions

static void InitParts (void)
 
static int GetLocalisedText (_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_ LPWSTR lpBuffer, _In_ int cchBufferMax)
 
static int LoadStringWrapW (_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_ LPWSTR lpBuffer, _In_ int cchBufferMax)
 
static DWORD CountParts (_In_ LPWSTR str)
 
static LPWSTR GetPart (_In_ LPWSTR str, _In_ SIZE_T num, _Out_ SIZE_T *len)
 
static BOOL CALLBACK find_locale_id_callback (_In_ HMODULE hModule, _In_ LPCWSTR type, _In_ LPCWSTR name, _In_ LANGID lang, _In_ LPARAM lParam)
 
static void SetLocale (_In_ LCID lcid)
 
static void TEST_NumParts (void)
 
static BOOL LoadPart (_In_ PART *p, _Out_ LPWSTR str, _In_ SIZE_T size)
 
static void TEST_PartMatches (void)
 
static void TEST_LocaleTests (void)
 
 START_TEST (LocaleTests)
 

Variables

DWORD dwVersion
 
LCID curLcid = 0
 
std::set< LANGIDlangs
 
std::map< E_MODULE, HMODULEmod
 
std::map< E_STRING, PART_TESTparts
 
static PART_MATCH PartMatches []
 

Macro Definition Documentation

◆ ADD_LIB

#define ADD_LIB (   eModule,
  pszPath 
)    lib.insert(std::make_pair(eModule, pszPath))

Typedef Documentation

◆ PART

typedef struct PART PART

◆ PART_MATCH

◆ PART_TEST

Enumeration Type Documentation

◆ E_MODULE

Enumerator
shell32 
userenv 
syssetup 
mmsys 

Definition at line 18 of file LocaleTests.cpp.

19{
20 shell32,
21 userenv,
23 mmsys,
24};
@ mmsys
Definition: LocaleTests.cpp:23
@ shell32
Definition: LocaleTests.cpp:20
@ userenv
Definition: LocaleTests.cpp:21
@ syssetup
Definition: LocaleTests.cpp:22

◆ E_STRING

Enumerator
SH32_PROGRAMS 
SH32_STARTUP 
SH32_STARTMENU 
SH32_PROGRAM_FILES 
SH32_PROGRAM_FILES_COMMON 
SH32_ADMINTOOLS 
UENV_STARTMENU 
UENV_PROGRAMS 
UENV_STARTUP 
SYSS_PROGRAMFILES 
SYSS_COMMONFILES 
MMSY_STARTMENU 

Definition at line 26 of file LocaleTests.cpp.

27{
40};
@ UENV_STARTUP
Definition: LocaleTests.cpp:36
@ SH32_PROGRAM_FILES
Definition: LocaleTests.cpp:31
@ SYSS_PROGRAMFILES
Definition: LocaleTests.cpp:37
@ SH32_PROGRAM_FILES_COMMON
Definition: LocaleTests.cpp:32
@ UENV_PROGRAMS
Definition: LocaleTests.cpp:35
@ SYSS_COMMONFILES
Definition: LocaleTests.cpp:38
@ UENV_STARTMENU
Definition: LocaleTests.cpp:34
@ MMSY_STARTMENU
Definition: LocaleTests.cpp:39
@ SH32_STARTUP
Definition: LocaleTests.cpp:29
@ SH32_STARTMENU
Definition: LocaleTests.cpp:30
@ SH32_ADMINTOOLS
Definition: LocaleTests.cpp:33
@ SH32_PROGRAMS
Definition: LocaleTests.cpp:28

Function Documentation

◆ CountParts()

static DWORD CountParts ( _In_ LPWSTR  str)
static

Definition at line 156 of file LocaleTests.cpp.

157{
158 DWORD count = 0;
159 LPWSTR ptr = str;
160
161 if (*ptr == UNICODE_NULL)
162 return 0;
163
164 while ((ptr = wcschr(ptr, L'\\')))
165 {
166 count++;
167 ptr++;
168 }
169
170 return count + 1;
171}
#define wcschr
Definition: compat.h:17
#define L(x)
Definition: resources.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
static PVOID ptr
Definition: dispmode.c:27
#define UNICODE_NULL
const WCHAR * str
uint16_t * LPWSTR
Definition: typedefs.h:56

Referenced by TEST_NumParts().

◆ find_locale_id_callback()

static BOOL CALLBACK find_locale_id_callback ( _In_ HMODULE  hModule,
_In_ LPCWSTR  type,
_In_ LPCWSTR  name,
_In_ LANGID  lang,
_In_ LPARAM  lParam 
)
static

Definition at line 192 of file LocaleTests.cpp.

194{
195 langs.insert(lang);
196 return TRUE;
197}
std::set< LANGID > langs
Definition: LocaleTests.cpp:63
#define TRUE
Definition: types.h:120
static const WCHAR lang[]
Definition: wbemdisp.c:287

Referenced by TEST_LocaleTests().

◆ GetLocalisedText()

static int GetLocalisedText ( _In_opt_ HINSTANCE  hInstance,
_In_ UINT  uID,
_Out_ LPWSTR  lpBuffer,
_In_ int  cchBufferMax 
)
static

Definition at line 121 of file LocaleTests.cpp.

122{
124 MAKEINTRESOURCEW((uID >> 4) + 1), curLcid);
125
126 if (!hRes)
128 MAKEINTRESOURCEW((uID >> 4) + 1),
130
131 if (!hRes)
132 return 0;
133
134 HGLOBAL hMem = LoadResource(hInstance, hRes);
135 if (!hMem)
136 return 0;
137
138 PWCHAR p = (PWCHAR)LockResource(hMem);
139 for (UINT i = 0; i < (uID & 0x0F); i++) p += *p + 1;
140
141 int len = (*p > cchBufferMax ? cchBufferMax : *p);
142 memcpy(lpBuffer, p + 1, len * sizeof(WCHAR));
144 return len;
145}
LCID curLcid
Definition: LocaleTests.cpp:62
HINSTANCE hInstance
Definition: charmap.c:19
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HRSRC WINAPI FindResourceExW(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang)
Definition: res.c:164
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
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 memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned int UINT
Definition: ndis.h:50
_Out_ LPWSTR lpBuffer
Definition: netsh.h:68
#define SORT_DEFAULT
#define MAKELCID(lgid, srtid)
#define RT_STRING
Definition: pedump.c:368
short WCHAR
Definition: pedump.c:58
_In_ UINT uID
Definition: shlwapi.h:156
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_ENGLISH
Definition: nls.h:52
#define SUBLANG_DEFAULT
Definition: nls.h:168
uint16_t * PWCHAR
Definition: typedefs.h:56
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by LoadStringWrapW().

◆ GetPart()

static LPWSTR GetPart ( _In_ LPWSTR  str,
_In_ SIZE_T  num,
_Out_ SIZE_T len 
)
static

Definition at line 173 of file LocaleTests.cpp.

174{
175 DWORD count = 0;
176 LPWSTR ptr = str, next;
177
178 while (count < num && (ptr = wcschr(ptr, L'\\')) != NULL)
179 {
180 count++;
181 ptr++;
182 }
183
184 if (!ptr)
185 ptr = str;
186
187 next = wcschr(ptr, L'\\');
188 *len = next ? next - ptr : wcslen(ptr);
189 return ptr;
190}
#define NULL
Definition: types.h:112
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
GLuint GLuint num
Definition: glext.h:9618
static unsigned __int64 next
Definition: rand_nt.c:6

Referenced by LoadPart().

◆ InitParts()

static void InitParts ( void  )
static

Definition at line 73 of file LocaleTests.cpp.

74{
75 static const PART_PAIR s_pairs[] =
76 {
77 // { eString, { eModule, id, nParts } }
78 { SH32_PROGRAMS, { shell32, 45 /* IDS_PROGRAMS "Start Menu\Programs" */, 2 } },
79 { SH32_STARTUP, { shell32, 48 /* IDS_STARTUP "Start Menu\Programs\StartUp" */, 3 } },
80 { SH32_STARTMENU, { shell32, 51 /* IDS_STARTMENU "Start Menu" */, 1 } },
81 { SH32_PROGRAM_FILES, { shell32, 63 /* IDS_PROGRAM_FILES "Program Files" */, 1 } },
82 { SH32_PROGRAM_FILES_COMMON, { shell32, 65 /* IDS_PROGRAM_FILES_COMMON "Program Files\Common Files" */, 2 } },
83 { SH32_ADMINTOOLS, { shell32, 67 /* IDS_ADMINTOOLS "Start Menu\Programs\Administrative Tools" */, 3 } },
84 { UENV_STARTMENU, { userenv, 11 /* IDS_STARTMENU "Start Menu" */, 1 } },
85 { UENV_PROGRAMS, { userenv, 12 /* IDS_PROGRAMS "Start Menu\Programs" */, 2 } },
86 { UENV_STARTUP, { userenv, 13 /* IDS_STARTUP "Start Menu\Programs\StartUp" */, 3 } },
87 { SYSS_PROGRAMFILES, { syssetup, 3600 /* IDS_PROGRAMFILES "%SystemDrive%\Program Files" */, 2 } },
88 { SYSS_COMMONFILES, { syssetup, 3601 /* IDS_COMMONFILES "Common Files" */, 1 } },
89 { MMSY_STARTMENU, { mmsys, 5851 /* IDS_STARTMENU "Start Menu" */, 1 } },
90 };
91 for (auto& pair : s_pairs)
92 {
93 parts.insert(std::make_pair(pair.eString, pair.part_test));
94 }
95}
std::map< E_STRING, PART_TEST > parts
Definition: LocaleTests.cpp:65
Definition: _pair.h:47

Referenced by TEST_LocaleTests().

◆ LoadPart()

static BOOL LoadPart ( _In_ PART p,
_Out_ LPWSTR  str,
_In_ SIZE_T  size 
)
static

Definition at line 228 of file LocaleTests.cpp.

229{
230 auto s = parts[p->Num];
231 E_MODULE m = s.eModule;
232
233 if (!mod[m])
234 {
236 return FALSE;
237 }
238
239 if (s.nParts != s.gotParts)
240 {
242 return FALSE;
243 }
244
245 WCHAR szBuffer[MAX_PATH];
246 LPWSTR szPart;
247 SIZE_T len;
248
249 LoadStringWrapW(mod[m], s.id, szBuffer, _countof(szBuffer));
250 szPart = GetPart(szBuffer, p->Idx, &len);
251 StringCchCopyNW(str, size, szPart, len);
252
253 return TRUE;
254}
E_MODULE
Definition: LocaleTests.cpp:19
static int LoadStringWrapW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_ LPWSTR lpBuffer, _In_ int cchBufferMax)
std::map< E_MODULE, HMODULE > mod
Definition: LocaleTests.cpp:64
static LPWSTR GetPart(_In_ LPWSTR str, _In_ SIZE_T num, _Out_ SIZE_T *len)
#define FALSE
Definition: types.h:117
#define SetLastError(x)
Definition: compat.h:752
#define MAX_PATH
Definition: compat.h:34
GLdouble s
Definition: gl.h:2039
GLsizeiptr size
Definition: glext.h:5919
const GLfloat * m
Definition: glext.h:10848
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define _countof(array)
Definition: sndvol32.h:70
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
Definition: strsafe.h:236
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define ERROR_INVALID_DATA
Definition: winerror.h:238

Referenced by TEST_PartMatches().

◆ LoadStringWrapW()

static int LoadStringWrapW ( _In_opt_ HINSTANCE  hInstance,
_In_ UINT  uID,
_Out_ LPWSTR  lpBuffer,
_In_ int  cchBufferMax 
)
static

Definition at line 147 of file LocaleTests.cpp.

148{
150 // Windows XP or lower: SetThreadLocale doesn't select user interface language
151 return GetLocalisedText(hInstance, uID, lpBuffer, cchBufferMax);
152 else
153 return LoadStringW(hInstance, uID, lpBuffer, cchBufferMax);
154}
static int GetLocalisedText(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_ LPWSTR lpBuffer, _In_ int cchBufferMax)
_In_ DWORD dwVersion
Definition: netsh.h:85
#define LoadStringW
Definition: utils.h:64
#define _WIN32_WINNT_WS03
Definition: sdkddkver.h:23

Referenced by LoadPart(), and TEST_NumParts().

◆ SetLocale()

static void SetLocale ( _In_ LCID  lcid)
static

Definition at line 199 of file LocaleTests.cpp.

200{
203 curLcid = lcid;
204}
LANGID WINAPI SetThreadUILanguage(IN LANGID LangId)
Definition: thread.c:937
BOOL WINAPI SetThreadLocale(LCID lcid)
Definition: locale.c:2822
LCID lcid
Definition: locale.c:5656

Referenced by TEST_LocaleTests().

◆ START_TEST()

START_TEST ( LocaleTests  )

Definition at line 360 of file LocaleTests.cpp.

361{
363}
static void TEST_LocaleTests(void)

◆ TEST_LocaleTests()

static void TEST_LocaleTests ( void  )
static

Definition at line 281 of file LocaleTests.cpp.

282{
283 // Initialization
284 InitParts();
285
287 memset(&osvi, 0, sizeof(osvi));
288 osvi.dwOSVersionInfoSize = sizeof(osvi);
289
292
293 WCHAR szOldDir[MAX_PATH], szBuffer[MAX_PATH];
294 GetCurrentDirectoryW(_countof(szOldDir), szOldDir);
295
296 std::map<E_MODULE, LPCWSTR> lib;
297#define ADD_LIB(eModule, pszPath) lib.insert(std::make_pair(eModule, pszPath))
298
299 GetModuleFileNameW(NULL, szBuffer, _countof(szBuffer));
300 LPCWSTR pszFind = StrStrW(szBuffer, L"modules\\rostests\\unittests");
301 if (pszFind)
302 {
303 // We're running in ReactOS output folder
304 WCHAR szNewDir[MAX_PATH];
305
306 StringCchCopyNW(szNewDir, _countof(szNewDir), szBuffer, pszFind - szBuffer);
307 SetCurrentDirectoryW(szNewDir);
308
309 ADD_LIB(shell32, L"dll\\win32\\shell32\\shell32.dll");
310 ADD_LIB(userenv, L"dll\\win32\\userenv\\userenv.dll");
311 ADD_LIB(syssetup, L"dll\\win32\\syssetup\\syssetup.dll");
312 ADD_LIB(mmsys, L"dll\\cpl\\mmsys\\mmsys.cpl");
313 }
314 else
315 {
316 ADD_LIB(shell32, L"shell32.dll");
317 ADD_LIB(userenv, L"userenv.dll");
318 ADD_LIB(syssetup, L"syssetup.dll");
319 ADD_LIB(mmsys, L"mmsys.cpl");
320 }
321#undef ADD_LIB
322
323 for (auto& lb : lib)
324 {
325 E_MODULE m = lb.first;
326
328 if (!mod[m])
329 {
330 trace("Failed to load '%S', error %lu\n", lib[m], GetLastError());
331 continue;
332 }
333
336 }
337
338 // Actual tests
339 for (auto& lang : langs)
340 {
342
345 }
346
347 // Perform cleanup
348 for (auto& m : mod)
349 {
350 if (!m.second)
351 continue;
352
353 FreeLibrary(m.second);
354 m.second = NULL;
355 }
356
357 SetCurrentDirectoryW(szOldDir);
358}
static void TEST_NumParts(void)
#define ADD_LIB(eModule, pszPath)
static void SetLocale(_In_ LCID lcid)
static BOOL CALLBACK find_locale_id_callback(_In_ HMODULE hModule, _In_ LPCWSTR type, _In_ LPCWSTR name, _In_ LANGID lang, _In_ LPARAM lParam)
static void TEST_PartMatches(void)
static void InitParts(void)
Definition: LocaleTests.cpp:73
#define trace
Definition: atltest.h:70
LPWSTR WINAPI StrStrW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
Definition: string.c:590
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:756
#define FreeLibrary(x)
Definition: compat.h:748
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:288
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
Definition: path.c:2168
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
Definition: version.c:37
BOOL WINAPI EnumResourceLanguagesW(HMODULE hmod, LPCWSTR type, LPCWSTR name, ENUMRESLANGPROCW lpfun, LONG_PTR lparam)
Definition: res.c:480
#define memset(x, y, z)
Definition: compat.h:39
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:237
ULONG dwMajorVersion
Definition: rtltypes.h:238
ULONG dwMinorVersion
Definition: rtltypes.h:239
const uint16_t * LPCWSTR
Definition: typedefs.h:57
OSVERSIONINFO osvi
Definition: ver.c:28
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define LOAD_LIBRARY_AS_DATAFILE
Definition: winbase.h:338
#define LOCALE_ILANGUAGE
Definition: winnls.h:30

Referenced by START_TEST().

◆ TEST_NumParts()

static void TEST_NumParts ( void  )
static

Definition at line 206 of file LocaleTests.cpp.

207{
208 for (auto& p : parts)
209 {
210 E_MODULE m = p.second.eModule;
211
212 if (!mod[m])
213 {
214 skip("No module for test %d\n", p.first);
215 continue;
216 }
217
218 WCHAR szBuffer[MAX_PATH];
219
220 LoadStringWrapW(mod[m], p.second.id, szBuffer, _countof(szBuffer));
221 p.second.gotParts = CountParts(szBuffer);
222
223 ok(p.second.nParts == p.second.gotParts, "Locale 0x%lX: Num parts mismatch %d - expected %lu, got %lu\n",
224 curLcid, p.first, p.second.nParts, p.second.gotParts);
225 }
226}
static DWORD CountParts(_In_ LPWSTR str)
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64

Referenced by TEST_LocaleTests().

◆ TEST_PartMatches()

static void TEST_PartMatches ( void  )
static

Definition at line 256 of file LocaleTests.cpp.

257{
258 for (auto& match : PartMatches)
259 {
260 WCHAR szP1[MAX_PATH], szP2[MAX_PATH];
261
262 if (!LoadPart(&match.p1, szP1, _countof(szP1)))
263 {
264 skip("%s for match test %d (pair 1)\n", GetLastError() == ERROR_FILE_NOT_FOUND
265 ? "No module" : "Invalid data", match.p1.Num);
266 continue;
267 }
268
269 if (!LoadPart(&match.p2, szP2, _countof(szP2)))
270 {
271 skip("%s for match test %d (pair 2)\n", GetLastError() == ERROR_FILE_NOT_FOUND
272 ? "No module" : "Invalid data", match.p2.Num);
273 continue;
274 }
275
276 ok(wcscmp(szP1, szP2) == 0, "Locale 0x%lX: Mismatching pairs %u:%u / %u:%u '%S' vs. '%S'\n",
277 curLcid, match.p1.Num, match.p1.Idx, match.p2.Num, match.p2.Idx, szP1, szP2);
278 }
279}
static BOOL LoadPart(_In_ PART *p, _Out_ LPWSTR str, _In_ SIZE_T size)
static PART_MATCH PartMatches[]
Definition: LocaleTests.cpp:97
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
Definition: match.c:28

Referenced by TEST_LocaleTests().

Variable Documentation

◆ curLcid

LCID curLcid = 0

Definition at line 62 of file LocaleTests.cpp.

Referenced by GetLocalisedText(), SetLocale(), TEST_NumParts(), and TEST_PartMatches().

◆ dwVersion

Definition at line 61 of file LocaleTests.cpp.

◆ langs

◆ mod

std::map<E_MODULE, HMODULE> mod

Definition at line 64 of file LocaleTests.cpp.

Referenced by __subformat(), _CrtGetMessageBox(), _CrtGetUser32(), abs_modifier(), asmparser_dcl_input(), asmparser_dcl_input_ps_2(), asmparser_dcl_sampler(), asmparser_instr(), asmparser_sincos(), asmparser_tex(), asmparser_texcoord(), asmparser_texcrd(), asmparser_texhelper(), asmparser_texld14(), asmparser_texreg2ar(), asmparser_texreg2gb(), asmparser_texreg2rgb(), AtlComModuleRegisterServer(), ATL::AtlComModuleRegisterServer(), ATL::AtlComModuleUnregisterServer(), CallShellDimScreen(), check_address_index_tree(), check_refcount(), check_tls_index(), codeview_get_type(), debug_argmod(), debug_dstmod(), debug_print_dstmod(), debug_print_srcmod(), do_div64(), doChild(), ExceptionFilter(), execute_test(), extract_one(), FatalAppExitA(), FatalAppExitW(), get_module_version(), get_objmap_entry(), GetScanCode(), gray_render_line(), gray_render_scanline(), if(), init_console(), init_pointers(), init_test_functions(), InitFunctionPointers(), is_old_loader_struct(), ldr_notify_callback1(), ldr_notify_callback_dll_main(), ldr_notify_callback_fail(), LdrpAccessResource(), LoadAndInitialize(), LoadPart(), map_image_section(), ME_ApplyStyle(), ME_SetDefaultCharFormat(), mixerOpen(), negate_modifiers(), CTrayWindow::OnCreate(), PrintBugreport(), ps_1_0123_dstreg(), ps_1_4_dstreg(), ps_2_0_dstreg(), rdssl_mod_exp(), record_declaration(), record_sampler(), register_for_arg(), sec_rsa_encrypt(), SeiCombineHookInfo(), shader_arb_get_modifier(), shader_hw_sample(), sm_3_dstreg(), start_debugger(), START_TEST(), sym_enum(), test_base_address_index_tree(), test_converttoemfplus(), test_createeffect(), test_ddag_node(), test_filenames(), test_GetFileVersionInfoEx(), test_GetProcAddress(), test_import_resolution(), test_LdrAddRefDll(), test_LdrGetDllHandleEx(), test_LdrRegisterDllNotification(), test_LoadLibraryEx_search_flags(), test_loadres(), Test_LoadUnload(), TEST_LocaleTests(), test_normal_imports(), TEST_NumParts(), test_ordinal_imports(), test_SetDefaultDllDirectories(), test_ToUnicode(), testGetModuleHandleEx(), testK32GetModuleInformation(), uninit_test_functions(), User32CallEventProcFromKernel(), User32CallHookProcFromKernel(), VectorTest(), vs_12_dstreg(), WCacheCheckLimitsR(), WCacheDiscardBlocks__(), WCacheFindFrameToRelease(), WCachePurgeAllR(), WCacheSyncReloc__(), WCacheUpdatePacket(), and write_declarations().

◆ PartMatches

PART_MATCH PartMatches[]
static
Initial value:
=
{
{ { SH32_PROGRAMS, 0 }, { SH32_STARTUP, 0 } },
{ { SH32_PROGRAMS, 0 }, { SH32_STARTMENU, 0 } },
{ { SH32_PROGRAMS, 0 }, { SH32_ADMINTOOLS, 0 } },
{ { SH32_PROGRAMS, 0 }, { UENV_STARTMENU, 0 } },
{ { SH32_PROGRAMS, 0 }, { UENV_PROGRAMS, 0 } },
{ { SH32_PROGRAMS, 0 }, { UENV_STARTUP, 0 } },
{ { SH32_PROGRAMS, 0 }, { MMSY_STARTMENU, 0 } },
{ { SH32_PROGRAMS, 1 }, { SH32_STARTUP, 1 } },
{ { SH32_PROGRAMS, 1 }, { SH32_ADMINTOOLS, 1 } },
{ { SH32_PROGRAMS, 1 }, { UENV_PROGRAMS, 1 } },
{ { SH32_PROGRAMS, 1 }, { UENV_STARTUP, 1 } },
{ { SH32_STARTUP, 2 }, { UENV_STARTUP, 2 } },
}

Definition at line 97 of file LocaleTests.cpp.

Referenced by TEST_PartMatches().

◆ parts