Add trailing '\n's to ok() calls.

This commit is contained in:
Francois Gouget 2004-02-07 01:03:17 +00:00 committed by Alexandre Julliard
parent f083d70024
commit 39081ddcd8
7 changed files with 203 additions and 203 deletions

View File

@ -106,22 +106,22 @@ static void testQuery(void)
pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->var, strlen(test->var)+1 );
nts = pRtlQueryEnvironmentVariable_U(small_env, &name, &value);
ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %lx got %lx",
ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %lx got %lx\n",
test - tests, test->var, test->status, nts );
if (nts == test->status) switch (nts)
{
case STATUS_SUCCESS:
pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->val, strlen(test->val)+1 );
ok( value.Length == strlen(test->val) * sizeof(WCHAR), "Wrong length %d/%d for %s",
ok( value.Length == strlen(test->val) * sizeof(WCHAR), "Wrong length %d/%d for %s\n",
value.Length, strlen(test->val) * sizeof(WCHAR), test->var );
ok((value.Length == strlen(test->val) * sizeof(WCHAR) && strncmpW(bv, bn, test->len) == 0) ||
strcmpW(bv, bn) == 0,
"Wrong result for %s/%d", test->var, test->len);
ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d", test->var, test->len);
"Wrong result for %s/%d\n", test->var, test->len);
ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d\n", test->var, test->len);
break;
case STATUS_BUFFER_TOO_SMALL:
ok( value.Length == strlen(test->val) * sizeof(WCHAR),
"Wrong returned length %d/%d (too small buffer) for %s",
"Wrong returned length %d/%d (too small buffer) for %s\n",
value.Length, strlen(test->val) * sizeof(WCHAR), test->var );
break;
}
@ -147,7 +147,7 @@ static void testSetHelper(LPWSTR* env, const char* var, const char* val, NTSTATU
pRtlMultiByteToUnicodeN( bval1, sizeof(bval1), NULL, val, strlen(val)+1 );
}
nts = pRtlSetEnvironmentVariable(env, &uvar, val ? &uval : NULL);
ok(nts == ret, "Setting var %s=%s (%lx/%lx)", var, val, nts, ret);
ok(nts == ret, "Setting var %s=%s (%lx/%lx)\n", var, val, nts, ret);
if (nts == STATUS_SUCCESS)
{
uval.Length = 0;
@ -157,13 +157,13 @@ static void testSetHelper(LPWSTR* env, const char* var, const char* val, NTSTATU
switch (nts)
{
case STATUS_SUCCESS:
ok(strcmpW(bval1, bval2) == 0, "Cannot get value written to environment");
ok(strcmpW(bval1, bval2) == 0, "Cannot get value written to environment\n");
break;
case STATUS_VARIABLE_NOT_FOUND:
ok(val == NULL, "Couldn't find variable, but didn't delete it");
ok(val == NULL, "Couldn't find variable, but didn't delete it\n");
break;
default:
ok(0, "Wrong ret %lu for %s", nts, var);
ok(0, "Wrong ret %lu for %s\n", nts, var);
break;
}
}
@ -175,7 +175,7 @@ static void testSet(void)
char tmp[16];
int i;
ok(pRtlCreateEnvironment(FALSE, &env) == STATUS_SUCCESS, "Creating environment");
ok(pRtlCreateEnvironment(FALSE, &env) == STATUS_SUCCESS, "Creating environment\n");
memmove(env, small_env, sizeof(small_env));
testSetHelper(&env, "cat", "dog", STATUS_SUCCESS);
@ -202,7 +202,7 @@ static void testSet(void)
}
testSetHelper(&env, "fOo", NULL, STATUS_SUCCESS);
ok(pRtlDestroyEnvironment(env) == STATUS_SUCCESS, "Destroying environment");
ok(pRtlDestroyEnvironment(env) == STATUS_SUCCESS, "Destroying environment\n");
}
static void testExpand(void)
@ -248,7 +248,7 @@ static void testExpand(void)
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
"Wrong returned length for %s: %lu <> %u",
"Wrong returned length for %s: %lu <> %u\n",
test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR));
us_dst.Length = 0;
@ -256,14 +256,14 @@ static void testExpand(void)
us_dst.Buffer = dst;
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
ok(nts == STATUS_SUCCESS, "Call failed (%lu)", nts);
ok(nts == STATUS_SUCCESS, "Call failed (%lu)\n", nts);
ok(ul == us_dst.Length + sizeof(WCHAR),
"Wrong returned length for %s: %lu <> %u",
"Wrong returned length for %s: %lu <> %u\n",
test->src, ul, us_dst.Length + sizeof(WCHAR));
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
"Wrong returned length for %s: %lu <> %u",
"Wrong returned length for %s: %lu <> %u\n",
test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR));
ok(strcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s",
ok(strcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n",
test->src, test->dst);
us_dst.Length = 0;
@ -271,14 +271,14 @@ static void testExpand(void)
us_dst.Buffer = dst;
dst[8] = '-';
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)", nts);
ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
"Wrong returned length for %s (with buffer too small): %lu <> %u",
"Wrong returned length for %s (with buffer too small): %lu <> %u\n",
test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR));
ok(strncmpW(dst, rst, 8) == 0,
"Wrong result for %s (with buffer too small): expecting %s",
"Wrong result for %s (with buffer too small): expecting %s\n",
test->src, test->dst);
ok(dst[8] == '-', "Writing too far in buffer (got %c/%d)", dst[8], dst[8]);
ok(dst[8] == '-', "Writing too far in buffer (got %c/%d)\n", dst[8], dst[8]);
}
}

View File

@ -72,7 +72,7 @@ static void cmp_call(NTSTATUS win_nt, ULONG win32, const char* message)
err = statustodoserror(win_nt);
ok(err == win32,
"%s (%lx): got %ld, expected %ld",
"%s (%lx): got %ld, expected %ld\n",
message, win_nt, err, win32);
}
@ -83,7 +83,7 @@ static void cmp_call2(NTSTATUS win_nt, ULONG win32, const char* message)
err = statustodoserror(win_nt);
ok(err == win32 ||
(!strict && err == ERROR_MR_MID_NOT_FOUND),
"%s (%lx): got %ld, expected %ld (or MID_NOT_FOUND)",
"%s (%lx): got %ld, expected %ld (or MID_NOT_FOUND)\n",
message, win_nt, err, win32);
}
@ -93,7 +93,7 @@ static void cmp_call3(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char*
err = statustodoserror(win_nt);
ok(err == win32_1 || (!strict && err == win32_2),
"%s (%lx): got %ld, expected %ld or %ld",
"%s (%lx): got %ld, expected %ld or %ld\n",
message, win_nt, err, win32_1, win32_2);
}
@ -104,7 +104,7 @@ static void cmp_call4(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char*
err = statustodoserror(win_nt);
ok(err == win32_1 ||
(!strict && (err == win32_2 || err == ERROR_MR_MID_NOT_FOUND)),
"%s (%lx): got %ld, expected %ld or %ld",
"%s (%lx): got %ld, expected %ld or %ld\n",
message, win_nt, err, win32_1, win32_2);
}

View File

@ -45,7 +45,7 @@ static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_
static void InitFunctionPtrs()
{
hntdll = LoadLibraryA("ntdll.dll");
ok(hntdll != 0, "LoadLibrary failed");
ok(hntdll != 0, "LoadLibrary failed\n");
if (hntdll) {
pRtlExtendedMagicDivide = (void *)GetProcAddress(hntdll, "RtlExtendedMagicDivide");
pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString");
@ -120,7 +120,7 @@ static void test_RtlExtendedMagicDivide(void)
for (i = 0; i < NB_MAGIC_DIVIDE; i++) {
result = pRtlExtendedMagicDivide(magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift);
ok(result == magic_divide[i].result,
"call failed: RtlExtendedMagicDivide(%lld, %llu, %d) has result %llx, expected %llx",
"call failed: RtlExtendedMagicDivide(%lld, %llu, %d) has result %llx, expected %llx\n",
magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift, result, magic_divide[i].result);
}
}
@ -329,22 +329,22 @@ static void one_RtlInt64ToUnicodeString_test(int test_num, const largeint2str_t
} /* if */
} else {
ok(result == largeint2str->result,
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) has result %lx, expected: %lx",
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) has result %lx, expected: %lx\n",
test_num, largeint2str->value, largeint2str->base, result, largeint2str->result);
if (result == STATUS_SUCCESS) {
ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0',
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string \"%s\" is not NULL terminated",
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string \"%s\" is not NULL terminated\n",
test_num, largeint2str->value, largeint2str->base, ansi_str.Buffer);
} /* if */
} /* if */
ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) assigns string \"%s\", expected: \"%s\"",
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
test_num, largeint2str->value, largeint2str->base, ansi_str.Buffer, expected_ansi_str.Buffer);
ok(unicode_string.Length == expected_unicode_string.Length,
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string has Length %d, expected: %d",
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string has Length %d, expected: %d\n",
test_num, largeint2str->value, largeint2str->base, unicode_string.Length, expected_unicode_string.Length);
ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength,
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string has MaximumLength %d, expected: %d",
"(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) string has MaximumLength %d, expected: %d\n",
test_num, largeint2str->value, largeint2str->base, unicode_string.MaximumLength, expected_unicode_string.MaximumLength);
pRtlFreeAnsiString(&expected_ansi_str);
pRtlFreeAnsiString(&ansi_str);
@ -376,10 +376,10 @@ static void one_RtlLargeIntegerToChar_test(int test_num, const largeint2str_t *l
result = pRtlLargeIntegerToChar(&value, largeint2str->base, largeint2str->MaximumLength, dest_str);
} /* if */
ok(result == largeint2str->result,
"(test %d): RtlLargeIntegerToChar(%llu, %d, %d, [out]) has result %lx, expected: %lx",
"(test %d): RtlLargeIntegerToChar(%llu, %d, %d, [out]) has result %lx, expected: %lx\n",
test_num, largeint2str->value, largeint2str->base, largeint2str->MaximumLength, result, largeint2str->result);
ok(memcmp(dest_str, largeint2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): RtlLargeIntegerToChar(%llu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"",
"(test %d): RtlLargeIntegerToChar(%llu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
test_num, largeint2str->value, largeint2str->base, largeint2str->MaximumLength, dest_str, largeint2str->Buffer);
}
@ -397,22 +397,22 @@ static void test_RtlLargeIntegerToChar(void)
value = largeint2str[0].value;
result = pRtlLargeIntegerToChar(&value, 20, largeint2str[0].MaximumLength, NULL);
ok(result == STATUS_INVALID_PARAMETER,
"(test a): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x",
"(test a): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n",
largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER);
result = pRtlLargeIntegerToChar(&value, 20, 0, NULL);
ok(result == STATUS_INVALID_PARAMETER,
"(test b): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x",
"(test b): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n",
largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER);
result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, 0, NULL);
ok(result == STATUS_BUFFER_OVERFLOW,
"(test c): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x",
"(test c): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n",
largeint2str[0].value, largeint2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW);
result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, largeint2str[0].MaximumLength, NULL);
ok(result == STATUS_ACCESS_VIOLATION,
"(test d): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x",
"(test d): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n",
largeint2str[0].value, largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION);
}

View File

@ -84,7 +84,7 @@ static void test_RtlDetermineDosPathNameType(void)
{
pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, test->path, strlen(test->path)+1 );
ret = pRtlDetermineDosPathNameType_U( buffer );
ok( ret == test->ret, "Wrong result %d/%d for %s", ret, test->ret, test->path );
ok( ret == test->ret, "Wrong result %d/%d for %s\n", ret, test->ret, test->path );
}
}
@ -148,7 +148,7 @@ static void test_RtlIsDosDeviceName(void)
pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, test->path, strlen(test->path)+1 );
ret = pRtlIsDosDeviceName_U( buffer );
ok( ret == MAKELONG( test->len, test->pos ),
"Wrong result (%d,%d)/(%d,%d) for %s",
"Wrong result (%d,%d)/(%d,%d) for %s\n",
HIWORD(ret), LOWORD(ret), test->pos, test->len, test->path );
}
}
@ -209,18 +209,18 @@ static void test_RtlIsNameLegalDOS8Dot3(void)
oem_ret.Length = oem_ret.MaximumLength = sizeof(buff2);
oem_ret.Buffer = buff2;
ret = pRtlIsNameLegalDOS8Dot3( &ustr, &oem_ret, &spaces );
ok( ret == test->result, "Wrong result %d/%d for '%s'", ret, test->result, test->path );
ok( spaces == test->spaces, "Wrong spaces value %d/%d for '%s'", spaces, test->spaces, test->path );
ok( ret == test->result, "Wrong result %d/%d for '%s'\n", ret, test->result, test->path );
ok( spaces == test->spaces, "Wrong spaces value %d/%d for '%s'\n", spaces, test->spaces, test->path );
if (strlen(test->path) <= 12)
{
char str[13];
int i;
strcpy( str, test->path );
for (i = 0; str[i]; i++) str[i] = toupper(str[i]);
ok( oem_ret.Length == strlen(test->path), "Wrong length %d/%d for '%s'",
ok( oem_ret.Length == strlen(test->path), "Wrong length %d/%d for '%s'\n",
oem_ret.Length, strlen(test->path), test->path );
ok( !memcmp( oem_ret.Buffer, str, oem_ret.Length ),
"Wrong string '%.*s'/'%s'", oem_ret.Length, oem_ret.Buffer, str );
"Wrong string '%.*s'/'%s'\n", oem_ret.Length, oem_ret.Buffer, str );
}
}
}

View File

@ -58,7 +58,7 @@ static char* dest = (char*)dest_aligned_block;
static void InitFunctionPtrs(void)
{
hntdll = LoadLibraryA("ntdll.dll");
ok(hntdll != 0, "LoadLibrary failed");
ok(hntdll != 0, "LoadLibrary failed\n");
if (hntdll) {
pRtlCompareMemory = (void *)GetProcAddress(hntdll, "RtlCompareMemory");
pRtlCompareMemoryUlong = (void *)GetProcAddress(hntdll, "RtlCompareMemoryUlong");
@ -241,7 +241,7 @@ static void test_RtlUlonglongByteSwap(void)
result = pRtlUlonglongByteSwap( ((ULONGLONG)0x76543210 << 32) | 0x87654321 );
ok( (((ULONGLONG)0x21436587 << 32) | 0x10325476) == result,
"RtlUlonglongByteSwap(0x7654321087654321) returns 0x%llx, expected 0x2143658710325476",
"RtlUlonglongByteSwap(0x7654321087654321) returns 0x%llx, expected 0x2143658710325476\n",
result);
}
@ -276,7 +276,7 @@ static void test_RtlUniform(void)
expected = 0x7fffffc3;
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 0)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 0)) returns %lx, expected %lx\n",
result, expected);
/*
* The algorithm is now:
@ -297,7 +297,7 @@ static void test_RtlUniform(void)
expected = seed * 0xffffffed + 0x7fffffc3 + 1;
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 1)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 1)) returns %lx, expected %lx\n",
result, expected);
/*
* For seed = 2 the const_2 is 0x7fffffc3:
@ -306,7 +306,7 @@ static void test_RtlUniform(void)
expected = seed * 0xffffffed + 0x7fffffc3;
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 2)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 2)) returns %lx, expected %lx\n",
result, expected);
/*
* More tests show that if seed is odd the result must be incremented by 1:
@ -315,21 +315,21 @@ static void test_RtlUniform(void)
expected = seed * 0xffffffed + 0x7fffffc3 + (seed & 1);
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 2)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 2)) returns %lx, expected %lx\n",
result, expected);
seed = 0x6bca1aa;
expected = seed * 0xffffffed + 0x7fffffc3;
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 0x6bca1aa)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 0x6bca1aa)) returns %lx, expected %lx\n",
result, expected);
seed = 0x6bca1ab;
expected = seed * 0xffffffed + 0x7fffffc3 + 1;
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 0x6bca1ab)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 0x6bca1ab)) returns %lx, expected %lx\n",
result, expected);
/*
* When seed is 0x6bca1ac there is an exception:
@ -338,7 +338,7 @@ static void test_RtlUniform(void)
expected = seed * 0xffffffed + 0x7fffffc3 + 2;
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 0x6bca1ac)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 0x6bca1ac)) returns %lx, expected %lx\n",
result, expected);
/*
* Note that up to here const_3 is not used
@ -350,14 +350,14 @@ static void test_RtlUniform(void)
expected = (seed * 0xffffffed + 0x7fffffc3) & MAXLONG;
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 0x6bca1ad)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 0x6bca1ad)) returns %lx, expected %lx\n",
result, expected);
seed = 0x6bca1ae;
expected = (seed * 0xffffffed + 0x7fffffc3 + 1) & MAXLONG;
result = pRtlUniform(&seed);
ok(result == expected,
"RtlUniform(&seed (seed == 0x6bca1ae)) returns %lx, expected %lx",
"RtlUniform(&seed (seed == 0x6bca1ae)) returns %lx, expected %lx\n",
result, expected);
/*
* There are several ranges where for odd or even seed the result must be
@ -465,10 +465,10 @@ static void test_RtlUniform(void)
seed_bak = seed;
result = pRtlUniform(&seed);
ok(result == expected,
"test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx",
"test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
num, seed_bak, result, expected);
ok(seed == expected,
"test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx",
"test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
num, seed_bak, seed, expected);
} /* for */
/*
@ -512,10 +512,10 @@ static void test_RtlUniform(void)
seed_bak = seed;
result = pRtlUniform(&seed);
ok(result == expected,
"test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx",
"test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
num, seed_bak, result, expected);
ok(seed == expected,
"test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx",
"test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
num, seed_bak, seed, expected);
} /* for */
/*
@ -592,10 +592,10 @@ static void test_RtlRandom(void)
seed_expected =0x44b;
result = pRtlRandom(&seed);
ok(result == result_expected,
"pRtlRandom(&seed (seed == 0)) returns %lx, expected %lx",
"pRtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n",
result, result_expected);
ok(seed == seed_expected,
"pRtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx",
"pRtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n",
seed, seed_expected);
/*
* Seed is not equal to result as with RtlUniform. To see more we
@ -606,10 +606,10 @@ static void test_RtlRandom(void)
seed_expected =0x44b;
result = pRtlRandom(&seed);
ok(result == result_expected,
"RtlRandom(&seed (seed == 0)) returns %lx, expected %lx",
"RtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n",
result, result_expected);
ok(seed == seed_expected,
"RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx",
"RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n",
seed, seed_expected);
/*
* Seed is set to the same value as before but the result is different.
@ -620,10 +620,10 @@ static void test_RtlRandom(void)
seed_expected =0x44b;
result = pRtlRandom(&seed);
ok(result == result_expected,
"RtlRandom(&seed (seed == 0)) returns %lx, expected %lx",
"RtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n",
result, result_expected);
ok(seed == seed_expected,
"RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx",
"RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n",
seed, seed_expected);
/*
* Seed is aggain set to the same value as before. This time we also
@ -668,10 +668,10 @@ static void test_RtlRandom(void)
seed_expected =0x5a1;
result = pRtlRandom(&seed);
ok(result == result_expected,
"RtlRandom(&seed (seed == 1)) returns %lx, expected %lx",
"RtlRandom(&seed (seed == 1)) returns %lx, expected %lx\n",
result, result_expected);
ok(seed == seed_expected,
"RtlRandom(&seed (seed == 1)) sets seed to %lx, expected %lx",
"RtlRandom(&seed (seed == 1)) sets seed to %lx, expected %lx\n",
seed, seed_expected);
/*
* If there is just one saved_value the result now would be
@ -729,10 +729,10 @@ static void test_RtlRandom(void)
} /* if */
result = pRtlRandom(&seed);
ok(result == result_expected,
"test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx",
"test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
num, seed_bak, result, result_expected);
ok(seed == seed_expected,
"test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx",
"test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
num, seed_bak, seed, seed_expected);
} /* for */
}
@ -768,7 +768,7 @@ static void test_RtlAreAllAccessesGranted(void)
result = pRtlAreAllAccessesGranted(all_accesses[test_num].GrantedAccess,
all_accesses[test_num].DesiredAccess);
ok(all_accesses[test_num].result == result,
"(test %d): RtlAreAllAccessesGranted(%08lx, %08lx) returns %d, expected %d",
"(test %d): RtlAreAllAccessesGranted(%08lx, %08lx) returns %d, expected %d\n",
test_num, all_accesses[test_num].GrantedAccess,
all_accesses[test_num].DesiredAccess,
result, all_accesses[test_num].result);
@ -805,7 +805,7 @@ static void test_RtlAreAnyAccessesGranted(void)
result = pRtlAreAnyAccessesGranted(any_accesses[test_num].GrantedAccess,
any_accesses[test_num].DesiredAccess);
ok(any_accesses[test_num].result == result,
"(test %d): RtlAreAnyAccessesGranted(%08lx, %08lx) returns %d, expected %d",
"(test %d): RtlAreAnyAccessesGranted(%08lx, %08lx) returns %d, expected %d\n",
test_num, any_accesses[test_num].GrantedAccess,
any_accesses[test_num].DesiredAccess,
result, any_accesses[test_num].result);

View File

@ -104,7 +104,7 @@ static WCHAR* AtoW( const char* p )
static void InitFunctionPtrs(void)
{
hntdll = LoadLibraryA("ntdll.dll");
ok(hntdll != 0, "LoadLibrary failed");
ok(hntdll != 0, "LoadLibrary failed\n");
if (hntdll) {
pRtlAnsiStringToUnicodeString = (void *)GetProcAddress(hntdll, "RtlAnsiStringToUnicodeString");
pRtlAppendAsciizToString = (void *)GetProcAddress(hntdll, "RtlAppendAsciizToString");
@ -149,14 +149,14 @@ static void test_RtlInitString(void)
str.MaximumLength = 0;
str.Buffer = (void *)0xdeadbeef;
pRtlInitString(&str, teststring);
ok(str.Length == sizeof(teststring) - sizeof(char), "Length uninitialized");
ok(str.MaximumLength == sizeof(teststring), "MaximumLength uninitialized");
ok(str.Buffer == teststring, "Buffer not equal to teststring");
ok(strcmp(str.Buffer, "Some Wild String") == 0, "Buffer written to");
ok(str.Length == sizeof(teststring) - sizeof(char), "Length uninitialized\n");
ok(str.MaximumLength == sizeof(teststring), "MaximumLength uninitialized\n");
ok(str.Buffer == teststring, "Buffer not equal to teststring\n");
ok(strcmp(str.Buffer, "Some Wild String") == 0, "Buffer written to\n");
pRtlInitString(&str, NULL);
ok(str.Length == 0, "Length uninitialized");
ok(str.MaximumLength == 0, "MaximumLength uninitialized");
ok(str.Buffer == NULL, "Buffer not equal to NULL");
ok(str.Length == 0, "Length uninitialized\n");
ok(str.MaximumLength == 0, "MaximumLength uninitialized\n");
ok(str.Buffer == NULL, "Buffer not equal to NULL\n");
/* pRtlInitString(NULL, teststring); */
}
@ -173,14 +173,14 @@ static void test_RtlInitUnicodeString(void)
uni.MaximumLength = 0;
uni.Buffer = (void *)0xdeadbeef;
pRtlInitUnicodeString(&uni, teststring);
ok(uni.Length == sizeof(teststring) - sizeof(WCHAR), "Length uninitialized");
ok(uni.MaximumLength == sizeof(teststring), "MaximumLength uninitialized");
ok(uni.Buffer == teststring, "Buffer not equal to teststring");
ok(lstrcmpW(uni.Buffer, originalstring) == 0, "Buffer written to");
ok(uni.Length == sizeof(teststring) - sizeof(WCHAR), "Length uninitialized\n");
ok(uni.MaximumLength == sizeof(teststring), "MaximumLength uninitialized\n");
ok(uni.Buffer == teststring, "Buffer not equal to teststring\n");
ok(lstrcmpW(uni.Buffer, originalstring) == 0, "Buffer written to\n");
pRtlInitUnicodeString(&uni, NULL);
ok(uni.Length == 0, "Length uninitialized");
ok(uni.MaximumLength == 0, "MaximumLength uninitialized");
ok(uni.Buffer == NULL, "Buffer not equal to NULL");
ok(uni.Length == 0, "Length uninitialized\n");
ok(uni.MaximumLength == 0, "MaximumLength uninitialized\n");
ok(uni.Buffer == NULL, "Buffer not equal to NULL\n");
/* pRtlInitUnicodeString(NULL, teststring); */
}
@ -205,16 +205,16 @@ static void test_RtlInitUnicodeStringEx(void)
uni.Buffer = (void *) 0xdeadbeef;
result = pRtlInitUnicodeStringEx(&uni, teststring);
ok(result == STATUS_SUCCESS,
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x",
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n",
result, STATUS_SUCCESS);
ok(uni.Length == 32,
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u",
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 32);
ok(uni.MaximumLength == 34,
"pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u",
"pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u\n",
uni.MaximumLength, 34);
ok(uni.Buffer == teststring,
"pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p",
"pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p\n",
uni.Buffer, teststring);
uni.Length = 12345;
@ -222,13 +222,13 @@ static void test_RtlInitUnicodeStringEx(void)
uni.Buffer = (void *) 0xdeadbeef;
pRtlInitUnicodeString(&uni, teststring);
ok(uni.Length == 32,
"pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u",
"pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 32);
ok(uni.MaximumLength == 34,
"pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u",
"pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n",
uni.MaximumLength, 34);
ok(uni.Buffer == teststring,
"pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p",
"pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n",
uni.Buffer, teststring);
uni.Length = 12345;
@ -236,16 +236,16 @@ static void test_RtlInitUnicodeStringEx(void)
uni.Buffer = (void *) 0xdeadbeef;
result = pRtlInitUnicodeStringEx(&uni, teststring2);
ok(result == STATUS_NAME_TOO_LONG,
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x",
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n",
result, STATUS_NAME_TOO_LONG);
ok(uni.Length == 12345,
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u",
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 12345);
ok(uni.MaximumLength == 12345,
"pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u",
"pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u\n",
uni.MaximumLength, 12345);
ok(uni.Buffer == (void *) 0xdeadbeef,
"pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %x",
"pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %x\n",
uni.Buffer, 0xdeadbeef);
uni.Length = 12345;
@ -253,32 +253,32 @@ static void test_RtlInitUnicodeStringEx(void)
uni.Buffer = (void *) 0xdeadbeef;
pRtlInitUnicodeString(&uni, teststring2);
ok(uni.Length == 33920,
"pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u",
"pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 33920);
ok(uni.MaximumLength == 33922,
"pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u",
"pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n",
uni.MaximumLength, 33922);
ok(uni.Buffer == teststring2,
"pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p",
"pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n",
uni.Buffer, teststring2);
ok(memcmp(uni.Buffer, teststring2, (TESTSTRING2_LEN + 1) * sizeof(WCHAR)) == 0,
"pRtlInitUnicodeString(&uni, 0) changes Buffer");
"pRtlInitUnicodeString(&uni, 0) changes Buffer\n");
uni.Length = 12345;
uni.MaximumLength = 12345;
uni.Buffer = (void *) 0xdeadbeef;
result = pRtlInitUnicodeStringEx(&uni, 0);
ok(result == STATUS_SUCCESS,
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x",
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n",
result, STATUS_SUCCESS);
ok(uni.Length == 0,
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u",
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 0);
ok(uni.MaximumLength == 0,
"pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u",
"pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u\n",
uni.MaximumLength, 0);
ok(uni.Buffer == NULL,
"pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p",
"pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p\n",
uni.Buffer, NULL);
uni.Length = 12345;
@ -286,13 +286,13 @@ static void test_RtlInitUnicodeStringEx(void)
uni.Buffer = (void *) 0xdeadbeef;
pRtlInitUnicodeString(&uni, 0);
ok(uni.Length == 0,
"pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u",
"pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 0);
ok(uni.MaximumLength == 0,
"pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u",
"pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n",
uni.MaximumLength, 0);
ok(uni.Buffer == NULL,
"pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p",
"pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n",
uni.Buffer, NULL);
}
@ -445,31 +445,31 @@ static void test_RtlDuplicateUnicodeString(void)
dest_ansi_buf[dest_ansi_str.Length] = '\0';
dest_ansi_str.Buffer = dest_ansi_buf;
ok(result == dupl_ustr[test_num].result,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has result %lx, expected %lx",
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has result %lx, expected %lx\n",
test_num, dupl_ustr[test_num].add_nul, result, dupl_ustr[test_num].result);
ok(dest_str.Length == dupl_ustr[test_num].res_Length,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has Length %d, expected %d",
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has Length %d, expected %d\n",
test_num, dupl_ustr[test_num].add_nul, dest_str.Length, dupl_ustr[test_num].res_Length);
ok(dest_str.MaximumLength == dupl_ustr[test_num].res_MaximumLength,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has MaximumLength %d, expected %d",
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has MaximumLength %d, expected %d\n",
test_num, dupl_ustr[test_num].add_nul, dest_str.MaximumLength, dupl_ustr[test_num].res_MaximumLength);
if (result == STATUS_INVALID_PARAMETER) {
ok((dest_str.Buffer == NULL && res_str.Buffer == NULL) ||
dest_str.Buffer == dest_buf,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination buffer changed %p expected %p",
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination buffer changed %p expected %p\n",
test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer, dest_buf);
} else {
ok(dest_str.Buffer != dest_buf,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination buffer unchanged %p",
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination buffer unchanged %p\n",
test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer);
} /* if */
if (dest_str.Buffer != NULL && dupl_ustr[test_num].res_buf != NULL) {
ok(memcmp(dest_str.Buffer, res_str.Buffer, dupl_ustr[test_num].res_buf_size) == 0,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"",
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"\n",
test_num, dupl_ustr[test_num].add_nul, dest_ansi_str.Buffer, dupl_ustr[test_num].res_buf);
} else {
ok(dest_str.Buffer == NULL && dupl_ustr[test_num].res_buf == NULL,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p",
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p\n",
test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer, dupl_ustr[test_num].res_buf);
} /* if */
} /* for */
@ -486,7 +486,7 @@ static void test_RtlCopyString(void)
pRtlInitString(&str, teststring);
pRtlInitString(&deststr, deststring);
pRtlCopyString(&deststr, &str);
ok(strncmp(str.Buffer, deststring, str.Length) == 0, "String not copied");
ok(strncmp(str.Buffer, deststring, str.Length) == 0, "String not copied\n");
}
@ -506,7 +506,7 @@ static void test_RtlUpperChar(void)
expected_upper_ch = (CHAR) byte_ch;
} /* if */
ok(upper_ch == expected_upper_ch,
"RtlUpperChar('%c'[=0x%x]) has result '%c'[=0x%x], expected '%c'[=0x%x]",
"RtlUpperChar('%c'[=0x%x]) has result '%c'[=0x%x], expected '%c'[=0x%x]\n",
ch, ch, upper_ch, upper_ch, expected_upper_ch, expected_upper_ch);
} /* for */
}
@ -550,7 +550,7 @@ static void test_RtlUpperString(void)
pRtlUpperString(&result_str, &ascii_str);
ok(memcmp(result_str.Buffer, upper_str.Buffer, 256) == 0,
"RtlUpperString does not work as expected");
"RtlUpperString does not work as expected\n");
}
@ -574,7 +574,7 @@ static void test_RtlUpcaseUnicodeChar(void)
expected_upper_ch = ch;
} /* if */
ok(upper_ch == expected_upper_ch,
"RtlUpcaseUnicodeChar('%c'[=0x%x]) has result '%c'[=0x%x], expected: '%c'[=0x%x]",
"RtlUpcaseUnicodeChar('%c'[=0x%x]) has result '%c'[=0x%x], expected: '%c'[=0x%x]\n",
ch, ch, upper_ch, upper_ch, expected_upper_ch, expected_upper_ch);
} /* for */
}
@ -623,7 +623,7 @@ static void test_RtlUpcaseUnicodeString(void)
pRtlUpcaseUnicodeString(&result_str, &ascii_str, 0);
for (i = 0; i <= 255; i++) {
ok(result_str.Buffer[i] == upper_str.Buffer[i],
"RtlUpcaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]",
"RtlUpcaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]\n",
ascii_str.Buffer[i], ascii_str.Buffer[i],
result_str.Buffer[i], result_str.Buffer[i],
upper_str.Buffer[i], upper_str.Buffer[i]);
@ -708,7 +708,7 @@ static void test_RtlDowncaseUnicodeString(void)
pRtlDowncaseUnicodeString(&result_str, &source_str, 0);
for (i = 0; i <= 1024; i++) {
ok(result_str.Buffer[i] == lower_str.Buffer[i] || result_str.Buffer[i] == source_str.Buffer[i] + 1,
"RtlDowncaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]",
"RtlDowncaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]\n",
source_str.Buffer[i], source_str.Buffer[i],
result_str.Buffer[i], result_str.Buffer[i],
lower_str.Buffer[i], lower_str.Buffer[i]);
@ -784,16 +784,16 @@ static void test_RtlUnicodeStringToAnsiString(void)
} /* if */
result = pRtlUnicodeStringToAnsiString(&ansi_str, &uni_str, ustr2astr[test_num].doalloc);
ok(result == ustr2astr[test_num].result,
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has result %lx, expected %lx",
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has result %lx, expected %lx\n",
test_num, ustr2astr[test_num].doalloc, result, ustr2astr[test_num].result);
ok(ansi_str.Length == ustr2astr[test_num].res_Length,
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has Length %d, expected %d",
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has Length %d, expected %d\n",
test_num, ustr2astr[test_num].doalloc, ansi_str.Length, ustr2astr[test_num].res_Length);
ok(ansi_str.MaximumLength == ustr2astr[test_num].res_MaximumLength,
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has MaximumLength %d, expected %d",
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has MaximumLength %d, expected %d\n",
test_num, ustr2astr[test_num].doalloc, ansi_str.MaximumLength, ustr2astr[test_num].res_MaximumLength);
ok(memcmp(ansi_str.Buffer, ustr2astr[test_num].res_buf, ustr2astr[test_num].res_buf_size) == 0,
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has ansi \"%s\" expected \"%s\"",
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has ansi \"%s\" expected \"%s\"\n",
test_num, ustr2astr[test_num].doalloc, ansi_str.Buffer, ustr2astr[test_num].res_buf);
} /* for */
}
@ -845,21 +845,21 @@ static void test_RtlAppendAsciizToString(void)
} /* if */
result = pRtlAppendAsciizToString(&dest_str, app_asc2str[test_num].src);
ok(result == app_asc2str[test_num].result,
"(test %d): RtlAppendAsciizToString(dest, src) has result %lx, expected %lx",
"(test %d): RtlAppendAsciizToString(dest, src) has result %lx, expected %lx\n",
test_num, result, app_asc2str[test_num].result);
ok(dest_str.Length == app_asc2str[test_num].res_Length,
"(test %d): RtlAppendAsciizToString(dest, src) dest has Length %d, expected %d",
"(test %d): RtlAppendAsciizToString(dest, src) dest has Length %d, expected %d\n",
test_num, dest_str.Length, app_asc2str[test_num].res_Length);
ok(dest_str.MaximumLength == app_asc2str[test_num].res_MaximumLength,
"(test %d): RtlAppendAsciizToString(dest, src) dest has MaximumLength %d, expected %d",
"(test %d): RtlAppendAsciizToString(dest, src) dest has MaximumLength %d, expected %d\n",
test_num, dest_str.MaximumLength, app_asc2str[test_num].res_MaximumLength);
if (dest_str.Buffer == dest_buf) {
ok(memcmp(dest_buf, app_asc2str[test_num].res_buf, app_asc2str[test_num].res_buf_size) == 0,
"(test %d): RtlAppendAsciizToString(dest, src) has dest \"%s\" expected \"%s\"",
"(test %d): RtlAppendAsciizToString(dest, src) has dest \"%s\" expected \"%s\"\n",
test_num, dest_buf, app_asc2str[test_num].res_buf);
} else {
ok(dest_str.Buffer == app_asc2str[test_num].res_buf,
"(test %d): RtlAppendAsciizToString(dest, src) dest has Buffer %p expected %p",
"(test %d): RtlAppendAsciizToString(dest, src) dest has Buffer %p expected %p\n",
test_num, dest_str.Buffer, app_asc2str[test_num].res_buf);
} /* if */
} /* for */
@ -926,21 +926,21 @@ static void test_RtlAppendStringToString(void)
} /* if */
result = pRtlAppendStringToString(&dest_str, &src_str);
ok(result == app_str2str[test_num].result,
"(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx",
"(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx\n",
test_num, result, app_str2str[test_num].result);
ok(dest_str.Length == app_str2str[test_num].res_Length,
"(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d",
"(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d\n",
test_num, dest_str.Length, app_str2str[test_num].res_Length);
ok(dest_str.MaximumLength == app_str2str[test_num].res_MaximumLength,
"(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d",
"(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d\n",
test_num, dest_str.MaximumLength, app_str2str[test_num].res_MaximumLength);
if (dest_str.Buffer == dest_buf) {
ok(memcmp(dest_buf, app_str2str[test_num].res_buf, app_str2str[test_num].res_buf_size) == 0,
"(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"",
"(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"\n",
test_num, dest_buf, app_str2str[test_num].res_buf);
} else {
ok(dest_str.Buffer == app_str2str[test_num].res_buf,
"(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p",
"(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p\n",
test_num, dest_str.Buffer, app_str2str[test_num].res_buf);
} /* if */
} /* for */
@ -998,21 +998,21 @@ static void test_RtlAppendUnicodeToString(void)
} /* if */
result = pRtlAppendUnicodeToString(&dest_str, (LPCWSTR) app_uni2str[test_num].src);
ok(result == app_uni2str[test_num].result,
"(test %d): RtlAppendUnicodeToString(dest, src) has result %lx, expected %lx",
"(test %d): RtlAppendUnicodeToString(dest, src) has result %lx, expected %lx\n",
test_num, result, app_uni2str[test_num].result);
ok(dest_str.Length == app_uni2str[test_num].res_Length,
"(test %d): RtlAppendUnicodeToString(dest, src) dest has Length %d, expected %d",
"(test %d): RtlAppendUnicodeToString(dest, src) dest has Length %d, expected %d\n",
test_num, dest_str.Length, app_uni2str[test_num].res_Length);
ok(dest_str.MaximumLength == app_uni2str[test_num].res_MaximumLength,
"(test %d): RtlAppendUnicodeToString(dest, src) dest has MaximumLength %d, expected %d",
"(test %d): RtlAppendUnicodeToString(dest, src) dest has MaximumLength %d, expected %d\n",
test_num, dest_str.MaximumLength, app_uni2str[test_num].res_MaximumLength);
if (dest_str.Buffer == dest_buf) {
ok(memcmp(dest_buf, app_uni2str[test_num].res_buf, app_uni2str[test_num].res_buf_size) == 0,
"(test %d): RtlAppendUnicodeToString(dest, src) has dest \"%s\" expected \"%s\"",
"(test %d): RtlAppendUnicodeToString(dest, src) has dest \"%s\" expected \"%s\"\n",
test_num, (char *) dest_buf, app_uni2str[test_num].res_buf);
} else {
ok(dest_str.Buffer == (WCHAR *) app_uni2str[test_num].res_buf,
"(test %d): RtlAppendUnicodeToString(dest, src) dest has Buffer %p expected %p",
"(test %d): RtlAppendUnicodeToString(dest, src) dest has Buffer %p expected %p\n",
test_num, dest_str.Buffer, app_uni2str[test_num].res_buf);
} /* if */
} /* for */
@ -1083,21 +1083,21 @@ static void test_RtlAppendUnicodeStringToString(void)
} /* if */
result = pRtlAppendUnicodeStringToString(&dest_str, &src_str);
ok(result == app_ustr2str[test_num].result,
"(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx",
"(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx\n",
test_num, result, app_ustr2str[test_num].result);
ok(dest_str.Length == app_ustr2str[test_num].res_Length,
"(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d",
"(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d\n",
test_num, dest_str.Length, app_ustr2str[test_num].res_Length);
ok(dest_str.MaximumLength == app_ustr2str[test_num].res_MaximumLength,
"(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d",
"(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d\n",
test_num, dest_str.MaximumLength, app_ustr2str[test_num].res_MaximumLength);
if (dest_str.Buffer == dest_buf) {
ok(memcmp(dest_buf, app_ustr2str[test_num].res_buf, app_ustr2str[test_num].res_buf_size) == 0,
"(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"",
"(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"\n",
test_num, (char *) dest_buf, app_ustr2str[test_num].res_buf);
} else {
ok(dest_str.Buffer == (WCHAR *) app_ustr2str[test_num].res_buf,
"(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p",
"(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p\n",
test_num, dest_str.Buffer, app_ustr2str[test_num].res_buf);
} /* if */
} /* for */
@ -1202,12 +1202,12 @@ static void test_RtlFindCharInUnicodeString(void)
pos = 12345;
result = pRtlFindCharInUnicodeString(find_ch_in_ustr[test_num].flags, &main_str, &search_chars, &pos);
ok(result == find_ch_in_ustr[test_num].result,
"(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) has result %lx, expected %lx",
"(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) has result %lx, expected %lx\n",
test_num, find_ch_in_ustr[test_num].flags,
find_ch_in_ustr[test_num].main_str, find_ch_in_ustr[test_num].search_chars,
result, find_ch_in_ustr[test_num].result);
ok(pos == find_ch_in_ustr[test_num].pos,
"(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) assigns %d to pos, expected %d",
"(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) assigns %d to pos, expected %d\n",
test_num, find_ch_in_ustr[test_num].flags,
find_ch_in_ustr[test_num].main_str, find_ch_in_ustr[test_num].search_chars,
pos, find_ch_in_ustr[test_num].pos);
@ -1353,10 +1353,10 @@ static void test_RtlUnicodeStringToInteger(void)
pRtlInitUnicodeString(&uni, wstr);
result = pRtlUnicodeStringToInteger(&uni, str2int[test_num].base, &value);
ok(result == str2int[test_num].result,
"(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx",
"(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx\n",
test_num, str2int[test_num].str, str2int[test_num].base, result, str2int[test_num].result);
ok(value == str2int[test_num].value,
"(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d",
"(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n",
test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value);
free(wstr);
} /* for */
@ -1365,38 +1365,38 @@ static void test_RtlUnicodeStringToInteger(void)
pRtlInitUnicodeString(&uni, wstr);
result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, NULL);
ok(result == STATUS_ACCESS_VIOLATION,
"call failed: RtlUnicodeStringToInteger(\"%s\", %d, NULL) has result %lx",
"call failed: RtlUnicodeStringToInteger(\"%s\", %d, NULL) has result %lx\n",
str2int[1].str, str2int[1].base, result);
result = pRtlUnicodeStringToInteger(&uni, 20, NULL);
ok(result == STATUS_INVALID_PARAMETER,
"call failed: RtlUnicodeStringToInteger(\"%s\", 20, NULL) has result %lx",
"call failed: RtlUnicodeStringToInteger(\"%s\", 20, NULL) has result %lx\n",
str2int[1].str, result);
uni.Length = 10; /* Make Length shorter (5 WCHARS instead of 7) */
result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value);
ok(result == STATUS_SUCCESS,
"call failed: RtlUnicodeStringToInteger(\"12345\", %d, [out]) has result %lx",
"call failed: RtlUnicodeStringToInteger(\"12345\", %d, [out]) has result %lx\n",
str2int[1].base, result);
ok(value == 12345,
"didn't return expected value (test a): expected: %d, got: %d",
"didn't return expected value (test a): expected: %d, got: %d\n",
12345, value);
uni.Length = 5; /* Use odd Length (2.5 WCHARS) */
result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value);
ok(result == STATUS_SUCCESS,
"call failed: RtlUnicodeStringToInteger(\"12\", %d, [out]) has result %lx",
"call failed: RtlUnicodeStringToInteger(\"12\", %d, [out]) has result %lx\n",
str2int[1].base, result);
ok(value == 12,
"didn't return expected value (test b): expected: %d, got: %d",
"didn't return expected value (test b): expected: %d, got: %d\n",
12, value);
uni.Length = 2;
result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value);
ok(result == STATUS_SUCCESS,
"call failed: RtlUnicodeStringToInteger(\"1\", %d, [out]) has result %lx",
"call failed: RtlUnicodeStringToInteger(\"1\", %d, [out]) has result %lx\n",
str2int[1].base, result);
ok(value == 1,
"didn't return expected value (test c): expected: %d, got: %d",
"didn't return expected value (test c): expected: %d, got: %d\n",
1, value);
/* w2k: uni.Length = 0 returns value 11234567 instead of 0 */
free(wstr);
@ -1415,22 +1415,22 @@ static void test_RtlCharToInteger(void)
value = 0xdeadbeef;
result = pRtlCharToInteger(str2int[test_num].str, str2int[test_num].base, &value);
ok(result == str2int[test_num].result,
"(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx",
"(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx\n",
test_num, str2int[test_num].str, str2int[test_num].base, result, str2int[test_num].result);
ok(value == str2int[test_num].value,
"(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d",
"(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n",
test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value);
} /* if */
} /* for */
result = pRtlCharToInteger(str2int[1].str, str2int[1].base, NULL);
ok(result == STATUS_ACCESS_VIOLATION,
"call failed: RtlCharToInteger(\"%s\", %d, NULL) has result %lx",
"call failed: RtlCharToInteger(\"%s\", %d, NULL) has result %lx\n",
str2int[1].str, str2int[1].base, result);
result = pRtlCharToInteger(str2int[1].str, 20, NULL);
ok(result == STATUS_INVALID_PARAMETER,
"call failed: RtlCharToInteger(\"%s\", 20, NULL) has result %lx",
"call failed: RtlCharToInteger(\"%s\", 20, NULL) has result %lx\n",
str2int[1].str, result);
}
@ -1598,22 +1598,22 @@ static void one_RtlIntegerToUnicodeString_test(int test_num, const int2str_t *in
} /* if */
} else {
ok(result == int2str->result,
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) has result %lx, expected: %lx",
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) has result %lx, expected: %lx\n",
test_num, int2str->value, int2str->base, result, int2str->result);
if (result == STATUS_SUCCESS) {
ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0',
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string \"%s\" is not NULL terminated",
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string \"%s\" is not NULL terminated\n",
test_num, int2str->value, int2str->base, ansi_str.Buffer);
} /* if */
} /* if */
ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) assigns string \"%s\", expected: \"%s\"",
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
test_num, int2str->value, int2str->base, ansi_str.Buffer, expected_ansi_str.Buffer);
ok(unicode_string.Length == expected_unicode_string.Length,
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has Length %d, expected: %d",
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has Length %d, expected: %d\n",
test_num, int2str->value, int2str->base, unicode_string.Length, expected_unicode_string.Length);
ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength,
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has MaximumLength %d, expected: %d",
"(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has MaximumLength %d, expected: %d\n",
test_num, int2str->value, int2str->base, unicode_string.MaximumLength, expected_unicode_string.MaximumLength);
pRtlFreeAnsiString(&expected_ansi_str);
pRtlFreeAnsiString(&ansi_str);
@ -1638,10 +1638,10 @@ static void one_RtlIntegerToChar_test(int test_num, const int2str_t *int2str)
dest_str[STRI_BUFFER_LENGTH] = '\0';
result = pRtlIntegerToChar(int2str->value, int2str->base, int2str->MaximumLength, dest_str);
ok(result == int2str->result,
"(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) has result %lx, expected: %lx",
"(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) has result %lx, expected: %lx\n",
test_num, int2str->value, int2str->base, int2str->MaximumLength, result, int2str->result);
ok(memcmp(dest_str, int2str->Buffer, STRI_BUFFER_LENGTH) == 0,
"(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"",
"(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
test_num, int2str->value, int2str->base, int2str->MaximumLength, dest_str, int2str->Buffer);
}
@ -1656,22 +1656,22 @@ static void test_RtlIntegerToChar(void)
result = pRtlIntegerToChar(int2str[0].value, 20, int2str[0].MaximumLength, NULL);
ok(result == STATUS_INVALID_PARAMETER,
"(test a): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x",
"(test a): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n",
int2str[0].value, 20, int2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER);
result = pRtlIntegerToChar(int2str[0].value, 20, 0, NULL);
ok(result == STATUS_INVALID_PARAMETER,
"(test b): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x",
"(test b): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n",
int2str[0].value, 20, 0, result, STATUS_INVALID_PARAMETER);
result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, 0, NULL);
ok(result == STATUS_BUFFER_OVERFLOW,
"(test c): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x",
"(test c): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n",
int2str[0].value, int2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW);
result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, int2str[0].MaximumLength, NULL);
ok(result == STATUS_ACCESS_VIOLATION,
"(test d): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x",
"(test d): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n",
int2str[0].value, int2str[0].base, int2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION);
}

View File

@ -65,7 +65,7 @@ static ULONG (WINAPIV *pwcstoul)(LPCWSTR, LPWSTR *, INT);
static void InitFunctionPtrs()
{
hntdll = LoadLibraryA("ntdll.dll");
ok(hntdll != 0, "LoadLibrary failed");
ok(hntdll != 0, "LoadLibrary failed\n");
if (hntdll) {
pRtlUnicodeStringToAnsiString = (void *)GetProcAddress(hntdll, "RtlUnicodeStringToAnsiString");
pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString");
@ -219,10 +219,10 @@ static void one_itoa_test(int test_num, const ulong2str_t *ulong2str)
value = ulong2str->value;
result = p_itoa(value, dest_str, ulong2str->base);
ok(result == dest_str,
"(test %d): _itoa(%d, [out], %d) has result %p, expected: %p",
"(test %d): _itoa(%d, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_str);
ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _itoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _itoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, dest_str, ulong2str->Buffer);
}
@ -238,10 +238,10 @@ static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str)
value = ulong2str->value;
result = p_ltoa(ulong2str->value, dest_str, ulong2str->base);
ok(result == dest_str,
"(test %d): _ltoa(%ld, [out], %d) has result %p, expected: %p",
"(test %d): _ltoa(%ld, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_str);
ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _ltoa(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _ltoa(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, dest_str, ulong2str->Buffer);
}
@ -257,10 +257,10 @@ static void one_ultoa_test(int test_num, const ulong2str_t *ulong2str)
value = ulong2str->value;
result = p_ultoa(ulong2str->value, dest_str, ulong2str->base);
ok(result == dest_str,
"(test %d): _ultoa(%lu, [out], %d) has result %p, expected: %p",
"(test %d): _ultoa(%lu, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_str);
ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _ultoa(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _ultoa(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, dest_str, ulong2str->Buffer);
}
@ -309,10 +309,10 @@ static void one_itow_test(int test_num, const ulong2str_t *ulong2str)
result = p_itow(value, dest_wstr, ulong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _itow(%d, [out], %d) has result %p, expected: %p",
"(test %d): _itow(%d, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_wstr);
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _itow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _itow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
}
@ -345,10 +345,10 @@ static void one_ltow_test(int test_num, const ulong2str_t *ulong2str)
result = p_ltow(value, dest_wstr, ulong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _ltow(%ld, [out], %d) has result %p, expected: %p",
"(test %d): _ltow(%ld, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_wstr);
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _ltow(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _ltow(%ld, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
}
@ -381,10 +381,10 @@ static void one_ultow_test(int test_num, const ulong2str_t *ulong2str)
result = p_ultow(value, dest_wstr, ulong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _ultow(%lu, [out], %d) has result %p, expected: %p",
"(test %d): _ultow(%lu, [out], %d) has result %p, expected: %p\n",
test_num, value, ulong2str->base, result, dest_wstr);
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _ultow(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _ultow(%lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
}
@ -415,7 +415,7 @@ static void test_ulongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_itow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test a): _itow(%ld, NULL, 10) has result %p, expected: NULL",
"(test a): _itow(%ld, NULL, 10) has result %p, expected: NULL\n",
ulong2str[0].value, result);
for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
@ -424,7 +424,7 @@ static void test_ulongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_ltow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test b): _ltow(%ld, NULL, 10) has result %p, expected: NULL",
"(test b): _ltow(%ld, NULL, 10) has result %p, expected: NULL\n",
ulong2str[0].value, result);
for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
@ -433,7 +433,7 @@ static void test_ulongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_ultow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test c): _ultow(%ld, NULL, 10) has result %p, expected: NULL",
"(test c): _ultow(%ld, NULL, 10) has result %p, expected: NULL\n",
ulong2str[0].value, result);
}
@ -598,19 +598,19 @@ static void one_i64toa_test(int test_num, const ulonglong2str_t *ulonglong2str)
dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_i64toa(ulonglong2str->value, dest_str, ulonglong2str->base);
ok(result == dest_str,
"(test %d): _i64toa(%Lu, [out], %d) has result %p, expected: %p",
"(test %d): _i64toa(%Lu, [out], %d) has result %p, expected: %p\n",
test_num, ulonglong2str->value, ulonglong2str->base, result, dest_str);
if (ulonglong2str->mask & 0x04) {
if (memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) != 0) {
if (memcmp(dest_str, ulonglong2str[1].Buffer, LARGE_STRI_BUFFER_LENGTH) != 0) {
ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, ulonglong2str->value, ulonglong2str->base, dest_str, ulonglong2str->Buffer);
} /* if */
} /* if */
} else {
ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _i64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, ulonglong2str->value, ulonglong2str->base, dest_str, ulonglong2str->Buffer);
} /* if */
}
@ -625,10 +625,10 @@ static void one_ui64toa_test(int test_num, const ulonglong2str_t *ulonglong2str)
dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_ui64toa(ulonglong2str->value, dest_str, ulonglong2str->base);
ok(result == dest_str,
"(test %d): _ui64toa(%Lu, [out], %d) has result %p, expected: %p",
"(test %d): _ui64toa(%Lu, [out], %d) has result %p, expected: %p\n",
test_num, ulonglong2str->value, ulonglong2str->base, result, dest_str);
ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _ui64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _ui64toa(%Lu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, ulonglong2str->value, ulonglong2str->base, dest_str, ulonglong2str->Buffer);
}
@ -675,7 +675,7 @@ static void one_i64tow_test(int test_num, const ulonglong2str_t *ulonglong2str)
result = p_i64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _i64tow(%llu, [out], %d) has result %p, expected: %p",
"(test %d): _i64tow(%llu, [out], %d) has result %p, expected: %p\n",
test_num, ulonglong2str->value, ulonglong2str->base, result, dest_wstr);
if (ulonglong2str->mask & 0x04) {
if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) {
@ -685,13 +685,13 @@ static void one_i64tow_test(int test_num, const ulonglong2str_t *ulonglong2str)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) {
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _i64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _i64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
} /* if */
} /* if */
} else {
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _i64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _i64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
} /* if */
pRtlFreeAnsiString(&ansi_str);
@ -723,10 +723,10 @@ static void one_ui64tow_test(int test_num, const ulonglong2str_t *ulonglong2str)
result = p_ui64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _ui64tow(%llu, [out], %d) has result %p, expected: %p",
"(test %d): _ui64tow(%llu, [out], %d) has result %p, expected: %p\n",
test_num, ulonglong2str->value, ulonglong2str->base, result, dest_wstr);
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _ui64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"",
"(test %d): _ui64tow(%llu, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
}
@ -756,7 +756,7 @@ static void test_ulonglongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_i64tow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test d): _i64tow(%llu, NULL, 10) has result %p, expected: NULL",
"(test d): _i64tow(%llu, NULL, 10) has result %p, expected: NULL\n",
ulonglong2str[0].value, result);
if (p_ui64tow) {
@ -766,7 +766,7 @@ static void test_ulonglongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_ui64tow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test e): _ui64tow(%llu, NULL, 10) has result %p, expected: NULL",
"(test e): _ui64tow(%llu, NULL, 10) has result %p, expected: NULL\n",
ulonglong2str[0].value, result);
} /* if */
}
@ -893,7 +893,7 @@ static void test_wtoi(void)
pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str);
result = p_wtoi(uni.Buffer);
ok(result == str2long[test_num].value,
"(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %ld",
"(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %ld\n",
test_num, str2long[test_num].str, result, str2long[test_num].value);
pRtlFreeUnicodeString(&uni);
} /* for */
@ -910,7 +910,7 @@ static void test_wtol(void)
pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str);
result = p_wtol(uni.Buffer);
ok(result == str2long[test_num].value,
"(test %d): call failed: _wtol(\"%s\") has result %ld, expected: %ld",
"(test %d): call failed: _wtol(\"%s\") has result %ld, expected: %ld\n",
test_num, str2long[test_num].str, result, str2long[test_num].value);
pRtlFreeUnicodeString(&uni);
} /* for */
@ -1048,7 +1048,7 @@ static void test_atoi64(void)
for (test_num = 0; test_num < NB_STR2LONGLONG; test_num++) {
result = p_atoi64(str2longlong[test_num].str);
ok(result == str2longlong[test_num].value,
"(test %d): call failed: _atoi64(\"%s\") has result %lld, expected: %lld",
"(test %d): call failed: _atoi64(\"%s\") has result %lld, expected: %lld\n",
test_num, str2longlong[test_num].str, result, str2longlong[test_num].value);
} /* for */
}
@ -1064,7 +1064,7 @@ static void test_wtoi64(void)
pRtlCreateUnicodeStringFromAsciiz(&uni, str2longlong[test_num].str);
result = p_wtoi64(uni.Buffer);
ok(result == str2longlong[test_num].value,
"(test %d): call failed: _wtoi64(\"%s\") has result %lld, expected: %lld",
"(test %d): call failed: _wtoi64(\"%s\") has result %lld, expected: %lld\n",
test_num, str2longlong[test_num].str, result, str2longlong[test_num].value);
pRtlFreeUnicodeString(&uni);
} /* for */