#include <stdlib.h>
#include "ntdll_test.h"
Go to the source code of this file.
|
static | NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING * |
|
static | VOID (WINAPI *pRtlFreeAnsiString)(PSTRING) |
|
static | BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING |
|
static | int (WINAPIV *patoi)(const char *) |
|
static | long (WINAPIV *patol)(const char *) |
|
static | LONGLONG (WINAPIV *p_atoi64)(const char *) |
|
static | LPSTR (WINAPIV *p_itoa)(int |
|
static | LPWSTR (WINAPIV *p_itow)(int |
|
static | LPWSTR (__cdecl *p_wcslwr)(LPWSTR) |
|
static | void (__cdecl *p_qsort)(void * |
|
static | int (__cdecl *compar)(const void * |
|
static const void *static void *__cdecl * | p_bsearch (void *, void *, size_t, size_t, int(__cdecl *compar)(const void *, const void *)) |
|
static const char static void | InitFunctionPtrs (void) |
|
static void | one_itoa_test (int test_num, const ulong2str_t *ulong2str) |
|
static void | one_ltoa_test (int test_num, const ulong2str_t *ulong2str) |
|
static void | one_ultoa_test (int test_num, const ulong2str_t *ulong2str) |
|
static void | test_ulongtoa (void) |
|
static void | one_itow_test (int test_num, const ulong2str_t *ulong2str) |
|
static void | one_ltow_test (int test_num, const ulong2str_t *ulong2str) |
|
static void | one_ultow_test (int test_num, const ulong2str_t *ulong2str) |
|
static void | test_ulongtow (void) |
|
static void | one_i64toa_test (int test_num, const ulonglong2str_t *ulonglong2str) |
|
static void | one_ui64toa_test (int test_num, const ulonglong2str_t *ulonglong2str) |
|
static void | test_ulonglongtoa (void) |
|
static void | one_i64tow_test (int test_num, const ulonglong2str_t *ulonglong2str) |
|
static void | one_ui64tow_test (int test_num, const ulonglong2str_t *ulonglong2str) |
|
static void | test_ulonglongtow (void) |
|
static void | test_wtoi (void) |
|
static void | test_atoi (void) |
|
static void | test_atol (void) |
|
static void | test_wtol (void) |
|
static void | test_atoi64 (void) |
|
static void | test_wtoi64 (void) |
|
static void | test_wcschr (void) |
|
static void | test_wcsrchr (void) |
|
static void | test_wcslwrupr (void) |
|
static int __cdecl | intcomparefunc (const void *a, const void *b) |
|
static int __cdecl | charcomparefunc (const void *a, const void *b) |
|
static int __cdecl | strcomparefunc (const void *a, const void *b) |
|
static void | test_qsort (void) |
|
static void | test_bsearch (void) |
|
static void | test__snprintf (void) |
|
| START_TEST (string) |
|
◆ LARGE_STRI_BUFFER_LENGTH
#define LARGE_STRI_BUFFER_LENGTH 67 |
◆ NB_STR2LONG
◆ NB_STR2LONGLONG
◆ NB_ULONG2STR
◆ NB_ULONGLONG2STR
◆ ULL
◆ BOOLEAN()
◆ charcomparefunc()
Definition at line 1177 of file string.c.
1179 const char *
p =
a, *
q =
b;
1181 ok (
a !=
b,
"must never get the same pointer\n");
GLboolean GLboolean GLboolean b
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean GLboolean a
Referenced by test_qsort().
◆ InitFunctionPtrs()
Definition at line 65 of file string.c.
68 ok(
hntdll != 0,
"LoadLibrary failed\n");
72 pRtlCreateUnicodeStringFromAsciiz = (
void *)
GetProcAddress(
hntdll,
"RtlCreateUnicodeStringFromAsciiz");
static const void *static void *__cdecl * p_bsearch(void *, void *, size_t, size_t, int(__cdecl *compar)(const void *, const void *))
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
#define GetProcAddress(x, y)
Referenced by START_TEST().
◆ int() [1/2]
static int |
( |
WINAPIV * |
patoi | ) |
const |
|
static |
◆ int() [2/2]
static int |
( |
__cdecl * |
compar | ) |
const |
◆ intcomparefunc()
Definition at line 1168 of file string.c.
1170 const int *
p =
a, *
q =
b;
1172 ok (
a !=
b,
"must never get the same pointer\n");
GLboolean GLboolean GLboolean b
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean GLboolean a
Referenced by test_bsearch(), and test_qsort().
◆ long()
◆ LONGLONG()
◆ LPSTR()
◆ LPWSTR() [1/2]
◆ LPWSTR() [2/2]
◆ NTSTATUS()
◆ one_i64toa_test()
Definition at line 594 of file string.c.
603 "(test %d): _i64toa(%s, [out], %d) has result %p, expected: %p\n",
609 "(test %d): _i64toa(%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
616 "(test %d): _i64toa(%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulonglong2str_t ulonglong2str[]
#define LARGE_STRI_BUFFER_LENGTH
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Referenced by test_ulonglongtoa().
◆ one_i64tow_test()
Definition at line 658 of file string.c.
673 dest_wstr[
pos] =
'-';
678 unicode_string.
Buffer = dest_wstr;
681 pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
683 "(test %d): _i64tow(0x%s, [out], %d) has result %p, expected: %p\n",
693 "(test %d): _i64tow(0x%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
700 "(test %d): _i64tow(0x%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
704 pRtlFreeAnsiString(&ansi_str);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulonglong2str_t ulonglong2str[]
#define LARGE_STRI_BUFFER_LENGTH
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Referenced by test_ulonglongtow().
◆ one_itoa_test()
Definition at line 218 of file string.c.
229 "(test %d): _itoa(%d, [out], %d) has result %p, expected: %p\n",
232 "(test %d): _itoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulong2str_t ulong2str[]
#define LARGE_STRI_BUFFER_LENGTH
GLsizei const GLfloat * value
Referenced by test_ulongtoa().
◆ one_itow_test()
Definition at line 293 of file string.c.
309 dest_wstr[
pos] =
'-';
314 unicode_string.
Buffer = dest_wstr;
317 pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
319 "(test %d): _itow(%d, [out], %d) has result %p, expected: %p\n",
322 "(test %d): _itow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
324 pRtlFreeAnsiString(&ansi_str);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulong2str_t ulong2str[]
#define LARGE_STRI_BUFFER_LENGTH
GLsizei const GLfloat * value
Referenced by test_ulongtow().
◆ one_ltoa_test()
Definition at line 237 of file string.c.
248 "(test %d): _ltoa(%d, [out], %d) has result %p, expected: %p\n",
251 "(test %d): _ltoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulong2str_t ulong2str[]
#define LARGE_STRI_BUFFER_LENGTH
GLsizei const GLfloat * value
Referenced by test_ulongtoa().
◆ one_ltow_test()
Definition at line 328 of file string.c.
344 dest_wstr[
pos] =
'-';
349 unicode_string.
Buffer = dest_wstr;
353 pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
355 "(test %d): _ltow(%d, [out], %d) has result %p, expected: %p\n",
358 "(test %d): _ltow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
360 pRtlFreeAnsiString(&ansi_str);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulong2str_t ulong2str[]
#define LARGE_STRI_BUFFER_LENGTH
GLsizei const GLfloat * value
Referenced by test_ulongtow().
◆ one_ui64toa_test()
Definition at line 623 of file string.c.
632 "(test %d): _ui64toa(%s, [out], %d) has result %p, expected: %p\n",
635 "(test %d): _ui64toa(%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulonglong2str_t ulonglong2str[]
#define LARGE_STRI_BUFFER_LENGTH
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Referenced by test_ulonglongtoa().
◆ one_ui64tow_test()
Definition at line 708 of file string.c.
723 dest_wstr[
pos] =
'-';
728 unicode_string.
Buffer = dest_wstr;
731 pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
733 "(test %d): _ui64tow(0x%s, [out], %d) has result %p, expected: %p\n",
737 "(test %d): _ui64tow(0x%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
740 pRtlFreeAnsiString(&ansi_str);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulonglong2str_t ulonglong2str[]
#define LARGE_STRI_BUFFER_LENGTH
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Referenced by test_ulonglongtow().
◆ one_ultoa_test()
Definition at line 256 of file string.c.
267 "(test %d): _ultoa(%u, [out], %d) has result %p, expected: %p\n",
270 "(test %d): _ultoa(%u, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulong2str_t ulong2str[]
#define LARGE_STRI_BUFFER_LENGTH
GLsizei const GLfloat * value
Referenced by test_ulongtoa().
◆ one_ultow_test()
Definition at line 364 of file string.c.
380 dest_wstr[
pos] =
'-';
385 unicode_string.
Buffer = dest_wstr;
389 pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
391 "(test %d): _ultow(%u, [out], %d) has result %p, expected: %p\n",
394 "(test %d): _ultow(%u, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
396 pRtlFreeAnsiString(&ansi_str);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static const ulong2str_t ulong2str[]
#define LARGE_STRI_BUFFER_LENGTH
GLsizei const GLfloat * value
Referenced by test_ulongtow().
◆ p_bsearch()
◆ START_TEST()
Definition at line 1304 of file string.c.
1328 if (p_wcslwr && p_wcsupr)
static void test_ulonglongtoa(void)
static void test_atol(void)
static void test_wtol(void)
static const char static void InitFunctionPtrs(void)
static void test_wcsrchr(void)
static void test_atoi64(void)
static const void *static void *__cdecl * p_bsearch(void *, void *, size_t, size_t, int(__cdecl *compar)(const void *, const void *))
static void test__snprintf(void)
static void test_bsearch(void)
static void test_ulongtow(void)
static void test_wcslwrupr(void)
static void test_ulonglongtow(void)
static void test_wtoi(void)
static void test_qsort(void)
static void test_ulongtoa(void)
static void test_atoi(void)
static void test_wtoi64(void)
static void test_wcschr(void)
◆ strcomparefunc()
Definition at line 1186 of file string.c.
1188 const char *
const *
p =
a;
1189 const char *
const *
q =
b;
1191 ok (
a !=
b,
"must never get the same pointer\n");
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
GLboolean GLboolean GLboolean b
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean GLboolean a
Referenced by test_qsort().
◆ test__snprintf()
Definition at line 1273 of file string.c.
1275 const char *origstring =
"XXXXXXXXXXXX";
1276 const char *teststring =
"hello world";
1280 res = p__snprintf(
NULL, 0, teststring);
1282 "_snprintf returned %d, expected %d.\n",
res,
lstrlenA(teststring));
1286 res = p__snprintf(
NULL, 1, teststring);
1288 "_snprintf returned %d, expected %d or < 0.\n",
res,
lstrlenA(teststring));
1291 ok(
res < 0,
"_snprintf returned %d, expected < 0.\n",
res);
1296 ok(!
strcmp(
buffer,
"hello worldX"),
"_snprintf returned buffer '%s', expected 'hello worldX'.\n",
buffer);
1301 ok(!
strcmp(
buffer, teststring),
"_snprintf returned buffer '%s', expected '%s'.\n",
buffer, teststring);
ACPI_SIZE strlen(const char *String)
int WINAPI lstrlenA(LPCSTR lpString)
char * strcpy(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
Referenced by START_TEST().
◆ test_atoi()
Definition at line 907 of file string.c.
912 for (test_num = 0; test_num <
NB_STR2LONG; test_num++) {
915 "(test %d): call failed: _atoi(\"%s\") has result %d, expected: %d\n",
static const str2long_t str2long[]
Referenced by START_TEST().
◆ test_atoi64()
Definition at line 1074 of file string.c.
1084 ULL(0x80000000,0x00000000) :
ULL(0x7fffffff,0xffffffff))),
1085 "(test %d): call failed: _atoi64(\"%s\") has result 0x%s, expected: 0x%s\n",
1090 "(test %d): call failed: _atoi64(\"%s\") has result 0x%s, expected: 0x%s\n",
static const str2longlong_t str2longlong[]
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Referenced by START_TEST().
◆ test_atol()
Definition at line 920 of file string.c.
925 for (test_num = 0; test_num <
NB_STR2LONG; test_num++) {
928 "(test %d): call failed: _atol(\"%s\") has result %d, expected: %d\n",
static const str2long_t str2long[]
Referenced by START_TEST().
◆ test_bsearch()
Definition at line 1255 of file string.c.
1257 int arr[7] = { 1, 3, 4, 8, 16, 23, 42 };
1261 for (
j=1;
j<
sizeof(arr)/
sizeof(arr[0]);
j++) {
1265 ok (
x == &arr[
i],
"bsearch did not find %d entry in loopsize %d.\n",
i,
j);
1269 ok (
x ==
NULL,
"bsearch did find 4242 entry in loopsize %d.\n",
j);
GLint GLint GLint GLint GLint x
static const void *static void *__cdecl * p_bsearch(void *, void *, size_t, size_t, int(__cdecl *compar)(const void *, const void *))
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 GLint GLint j
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
static int __cdecl intcomparefunc(const void *a, const void *b)
Referenced by START_TEST().
◆ test_qsort()
Definition at line 1196 of file string.c.
1198 int arr[5] = { 23, 42, 8, 4, 16 };
1199 char carr[5] = { 42, 23, 4, 8, 16 };
1200 const char *strarr[7] = {
1211 ok(arr[0] == 23,
"badly sorted, nmemb=0, arr[0] is %d\n", arr[0]);
1212 ok(arr[1] == 42,
"badly sorted, nmemb=0, arr[1] is %d\n", arr[1]);
1213 ok(arr[2] == 8,
"badly sorted, nmemb=0, arr[2] is %d\n", arr[2]);
1214 ok(arr[3] == 4,
"badly sorted, nmemb=0, arr[3] is %d\n", arr[3]);
1215 ok(arr[4] == 16,
"badly sorted, nmemb=0, arr[4] is %d\n", arr[4]);
1218 ok(arr[0] == 23,
"badly sorted, nmemb=1, arr[0] is %d\n", arr[0]);
1219 ok(arr[1] == 42,
"badly sorted, nmemb=1, arr[1] is %d\n", arr[1]);
1220 ok(arr[2] == 8,
"badly sorted, nmemb=1, arr[2] is %d\n", arr[2]);
1221 ok(arr[3] == 4,
"badly sorted, nmemb=1, arr[3] is %d\n", arr[3]);
1222 ok(arr[4] == 16,
"badly sorted, nmemb=1, arr[4] is %d\n", arr[4]);
1225 ok(arr[0] == 23,
"badly sorted, size=0, arr[0] is %d\n", arr[0]);
1226 ok(arr[1] == 42,
"badly sorted, size=0, arr[1] is %d\n", arr[1]);
1227 ok(arr[2] == 8,
"badly sorted, size=0, arr[2] is %d\n", arr[2]);
1228 ok(arr[3] == 4,
"badly sorted, size=0, arr[3] is %d\n", arr[3]);
1229 ok(arr[4] == 16,
"badly sorted, size=0, arr[4] is %d\n", arr[4]);
1232 ok(arr[0] == 4,
"badly sorted, arr[0] is %d\n", arr[0]);
1233 ok(arr[1] == 8,
"badly sorted, arr[1] is %d\n", arr[1]);
1234 ok(arr[2] == 16,
"badly sorted, arr[2] is %d\n", arr[2]);
1235 ok(arr[3] == 23,
"badly sorted, arr[3] is %d\n", arr[3]);
1236 ok(arr[4] == 42,
"badly sorted, arr[4] is %d\n", arr[4]);
1239 ok(carr[0] == 4,
"badly sorted, carr[0] is %d\n", carr[0]);
1240 ok(carr[1] == 8,
"badly sorted, carr[1] is %d\n", carr[1]);
1241 ok(carr[2] == 16,
"badly sorted, carr[2] is %d\n", carr[2]);
1242 ok(carr[3] == 23,
"badly sorted, carr[3] is %d\n", carr[3]);
1243 ok(carr[4] == 42,
"badly sorted, carr[4] is %d\n", carr[4]);
1246 ok(!
strcmp(strarr[0],
"!"),
"badly sorted, strarr[0] is %s\n", strarr[0]);
1247 ok(!
strcmp(strarr[1],
"."),
"badly sorted, strarr[1] is %s\n", strarr[1]);
1248 ok(!
strcmp(strarr[2],
"Hello"),
"badly sorted, strarr[2] is %s\n", strarr[2]);
1249 ok(!
strcmp(strarr[3],
"Hopefully"),
"badly sorted, strarr[3] is %s\n", strarr[3]);
1250 ok(!
strcmp(strarr[4],
"Sorted"),
"badly sorted, strarr[4] is %s\n", strarr[4]);
1251 ok(!
strcmp(strarr[5],
"Wine"),
"badly sorted, strarr[5] is %s\n", strarr[5]);
1252 ok(!
strcmp(strarr[6],
"World"),
"badly sorted, strarr[6] is %s\n", strarr[6]);
static int __cdecl strcomparefunc(const void *a, const void *b)
static int __cdecl charcomparefunc(const void *a, const void *b)
int strcmp(const char *String1, const char *String2)
static int __cdecl intcomparefunc(const void *a, const void *b)
Referenced by START_TEST().
◆ test_ulonglongtoa()
Definition at line 641 of file string.c.
649 if (p_ui64toa !=
NULL) {
static void one_i64toa_test(int test_num, const ulonglong2str_t *ulonglong2str)
static void one_ui64toa_test(int test_num, const ulonglong2str_t *ulonglong2str)
static const ulonglong2str_t ulonglong2str[]
Referenced by START_TEST().
◆ test_ulonglongtow()
Definition at line 744 of file string.c.
764 "(test d): _i64tow(0x%s, NULL, 10) has result %p, expected: NULL\n",
773 "(test e): _ui64tow(0x%s, NULL, 10) has result %p, expected: NULL\n",
static void one_ui64tow_test(int test_num, const ulonglong2str_t *ulonglong2str)
static const ulonglong2str_t ulonglong2str[]
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
static void one_i64tow_test(int test_num, const ulonglong2str_t *ulonglong2str)
Referenced by START_TEST().
◆ test_ulongtoa()
Definition at line 275 of file string.c.
279 for (test_num = 0; test_num <
NB_ULONG2STR; test_num++) {
static void one_itoa_test(int test_num, const ulong2str_t *ulong2str)
static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str)
static void one_ultoa_test(int test_num, const ulong2str_t *ulong2str)
static const ulong2str_t ulong2str[]
Referenced by START_TEST().
◆ test_ulongtow()
Definition at line 400 of file string.c.
405 for (test_num = 0; test_num <
NB_ULONG2STR; test_num++) {
421 "(test a): _itow(%d, NULL, 10) has result %p, expected: NULL\n",
429 "(test b): _ltow(%d, NULL, 10) has result %p, expected: NULL\n",
437 "(test c): _ultow(%d, NULL, 10) has result %p, expected: NULL\n",
static void one_ultow_test(int test_num, const ulong2str_t *ulong2str)
static void one_ltow_test(int test_num, const ulong2str_t *ulong2str)
static const ulong2str_t ulong2str[]
static void one_itow_test(int test_num, const ulong2str_t *ulong2str)
Referenced by START_TEST().
◆ test_wcschr()
Definition at line 1122 of file string.c.
1124 static const WCHAR teststringW[] = {
'a',
'b',
'r',
'a',
'c',
'a',
'd',
'a',
'b',
'r',
'a',0};
1126 ok(p_wcschr(teststringW,
'a') == teststringW + 0,
1127 "wcschr should have returned a pointer to the first 'a' character\n");
1128 ok(p_wcschr(teststringW, 0) == teststringW + 11,
1129 "wcschr should have returned a pointer to the null terminator\n");
1130 ok(p_wcschr(teststringW,
'x') ==
NULL,
1131 "wcschr should have returned NULL\n");
Referenced by START_TEST().
◆ test_wcslwrupr()
Definition at line 1146 of file string.c.
1148 static WCHAR teststringW[] = {
'a',
'b',
'r',
'a',
'c',
'a',
'd',
'a',
'b',
'r',
'a',0};
1150 static const WCHAR constemptyW[] = {0};
1154 static const WCHAR conststringW[] = {
'a',
'b',
'r',
'a',
'c',
'a',
'd',
'a',
'b',
'r',
'a',0};
1155 ok(p_wcslwr((
LPWSTR)conststringW) == conststringW,
"p_wcslwr returned different string\n");
1156 ok(p_wcsupr((
LPWSTR)conststringW) == conststringW,
"p_wcsupr returned different string\n");
1157 ok(p_wcslwr(
NULL) ==
NULL,
"p_wcslwr didn't returned NULL\n");
1158 ok(p_wcsupr(
NULL) ==
NULL,
"p_wcsupr didn't returned NULL\n");
1160 ok(p_wcslwr(teststringW) == teststringW,
"p_wcslwr returned different string\n");
1161 ok(p_wcsupr(teststringW) == teststringW,
"p_wcsupr returned different string\n");
1162 ok(p_wcslwr(
emptyW) ==
emptyW,
"p_wcslwr returned different string\n");
1163 ok(p_wcsupr(
emptyW) ==
emptyW,
"p_wcsupr returned different string\n");
1164 ok(p_wcslwr((
LPWSTR)constemptyW) == constemptyW,
"p_wcslwr returned different string\n");
1165 ok(p_wcsupr((
LPWSTR)constemptyW) == constemptyW,
"p_wcsupr returned different string\n");
static const WCHAR emptyW[]
Referenced by START_TEST().
◆ test_wcsrchr()
Definition at line 1134 of file string.c.
1136 static const WCHAR teststringW[] = {
'a',
'b',
'r',
'a',
'c',
'a',
'd',
'a',
'b',
'r',
'a',0};
1138 ok(p_wcsrchr(teststringW,
'a') == teststringW + 10,
1139 "wcsrchr should have returned a pointer to the last 'a' character\n");
1140 ok(p_wcsrchr(teststringW, 0) == teststringW + 11,
1141 "wcsrchr should have returned a pointer to the null terminator\n");
1142 ok(p_wcsrchr(teststringW,
'x') ==
NULL,
1143 "wcsrchr should have returned NULL\n");
Referenced by START_TEST().
◆ test_wtoi()
Definition at line 891 of file string.c.
897 for (test_num = 0; test_num <
NB_STR2LONG; test_num++) {
898 pRtlCreateUnicodeStringFromAsciiz(&uni,
str2long[test_num].
str);
901 "(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %d\n",
903 pRtlFreeUnicodeString(&uni);
static const str2long_t str2long[]
Referenced by START_TEST().
◆ test_wtoi64()
Definition at line 1097 of file string.c.
1109 ULL(0x80000000,0x00000000) :
ULL(0x7fffffff,0xffffffff))),
1110 "(test %d): call failed: _atoi64(\"%s\") has result 0x%s, expected: 0x%s\n",
1115 "(test %d): call failed: _atoi64(\"%s\") has result 0x%s, expected: 0x%s\n",
1118 pRtlFreeUnicodeString(&uni);
static const str2longlong_t str2longlong[]
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Referenced by START_TEST().
◆ test_wtol()
Definition at line 933 of file string.c.
939 for (test_num = 0; test_num <
NB_STR2LONG; test_num++) {
940 pRtlCreateUnicodeStringFromAsciiz(&uni,
str2long[test_num].
str);
943 "(test %d): call failed: _wtol(\"%s\") has result %d, expected: %d\n",
945 pRtlFreeUnicodeString(&uni);
static const str2long_t str2long[]
Referenced by START_TEST().
◆ VOID()
◆ void()
◆ BOOLEAN
◆ hntdll
◆ INT
◆ int
◆ LPCSTR
◆ LPSTR
◆ LPWSTR
◆ size_t
◆ str2long
◆ str2longlong
◆ ulong2str
◆ ulonglong2str
◆ WCHAR