11#define WIN32_NO_STATUS
17#ifndef TEST_STATIC_CRT
37 unsigned char dest[16];
38 const unsigned char first[] =
"dinosaur";
39 const unsigned char second[] =
"duck";
50#ifndef TEST_STATIC_CRT
56 skip(
"Skipping tests, because %s is not available\n", fname);
64 ok(
s ==
NULL,
"Expected %s to return NULL, got %p\n", fname,
s);
69 ok(
s ==
NULL,
"Expected %s to return NULL, got %p\n", fname,
s);
75 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
76 ok(
dest[0] ==
'X',
"Expected the output buffer to be untouched\n");
82 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
83 ok(
dest[0] ==
'X',
"Expected the output buffer to be untouched\n");
90 ok(
s ==
NULL,
"Expected %s to return NULL, got %p\n", fname,
s);
91 ok(
dest[0] ==
'X',
"Expected the output buffer to be untouched\n");
98 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
100 "Expected the output buffer string to be \"duck\", got '%s'\n",
dest);
106 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
108 "Expected the output buffer string to be \"dinosaur\", got '%s'\n",
dest);
113 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
114 ok(!
memcmp(
dest,
"dinosaurduck",
sizeof(
"dinosaurduck")),
115 "Expected the output buffer string to be \"dinosaurduck\", got '%s'\n",
dest);
119 s =
func(
dest, second,
sizeof(second) + 1);
120 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
121 ok(!
memcmp(
dest,
"dinosaurduck",
sizeof(
"dinosaurduck")),
122 "Expected the output buffer string to be \"dinosaurduck\", got '%s'\n",
dest);
126 s =
func(
dest, second,
sizeof(second) - 1);
127 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
128 ok(!
memcmp(
dest,
"dinosaurduck",
sizeof(
"dinosaurduck")),
129 "Expected the output buffer string to be \"dinosaurduck\", got '%s'\n",
dest);
133 s =
func(
dest, second,
sizeof(second) - 2);
134 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
136 "Expected the output buffer string to be \"dinosaurduc\", got '%s'\n",
dest);
141 s =
func(
dest, second,
sizeof(second) - 1);
142 ok(
s ==
dest,
"Expected %s to return dest pointer, got %p\n", fname,
s);
143 ok(!
memcmp(
dest,
"dinosaurduck",
sizeof(
"dinosaurduck")),
144 "Expected the output buffer string to be \"dinosaurduck\", got '%s'\n",
dest);
152#ifndef TEST_STATIC_CRT
153 #define _mbsncat NULL
unsigned char *(__cdecl * PFN__mbsncat)(unsigned char *, const unsigned char *, size_t)
VOID mbsncat_PerformTests(_In_ LPSTR fname, _In_opt_ PFN__mbsncat func)
static USHORT GetWinVersion(VOID)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define EndSeh(ExpectedStatus)
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetVersion(void)
#define STATUS_ACCESS_VIOLATION
#define memcpy(s1, s2, n)