ntdll/tests: Use standard wine_dbgstr_longlong.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2017-08-06 23:31:31 +00:00 committed by Alexandre Julliard
parent db848fa767
commit 3b05f552e2
6 changed files with 86 additions and 93 deletions

View File

@ -504,8 +504,8 @@ static void test_NtQueryDirectoryFile(void)
}
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0, "wrong pos %x%08x\n",
(DWORD)(pos_info.CurrentByteOffset.QuadPart >> 32), (DWORD)pos_info.CurrentByteOffset.QuadPart );
ok( pos_info.CurrentByteOffset.QuadPart == 0, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart));
pos_info.CurrentByteOffset.QuadPart = 0xbeef;
status = pNtSetInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
@ -513,8 +513,8 @@ static void test_NtQueryDirectoryFile(void)
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %x%08x\n",
(DWORD)(pos_info.CurrentByteOffset.QuadPart >> 32), (DWORD)pos_info.CurrentByteOffset.QuadPart );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart));
mask.Buffer = testfiles[0].name;
mask.Length = mask.MaximumLength = lstrlenW(testfiles[0].name) * sizeof(WCHAR);
@ -528,8 +528,8 @@ static void test_NtQueryDirectoryFile(void)
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %x%08x\n",
(DWORD)(pos_info.CurrentByteOffset.QuadPart >> 32), (DWORD)pos_info.CurrentByteOffset.QuadPart );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart) );
mask.Length = mask.MaximumLength = fbdi->ShortNameLength;
memcpy(short_name, fbdi->ShortName, mask.Length);
@ -549,8 +549,8 @@ static void test_NtQueryDirectoryFile(void)
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %x%08x\n",
(DWORD)(pos_info.CurrentByteOffset.QuadPart >> 32), (DWORD)pos_info.CurrentByteOffset.QuadPart );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart) );
/* tests with short buffer */
memset( data, 0x55, data_size );

View File

@ -1198,7 +1198,7 @@ static void test_query_process_io(void)
ok( sizeof(pii) == ReturnLength, "Inconsistent length %d\n", ReturnLength);
/* Check if we have some return values */
trace("OtherOperationCount : 0x%x%08x\n", (DWORD)(pii.OtherOperationCount >> 32), (DWORD)pii.OtherOperationCount);
trace("OtherOperationCount : 0x%s\n", wine_dbgstr_longlong(pii.OtherOperationCount));
todo_wine
{
ok( pii.OtherOperationCount > 0, "Expected an OtherOperationCount > 0\n");

View File

@ -113,10 +113,9 @@ 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(0x%x%08x, 0x%x%08x, %d) has result 0x%x%08x, expected 0x%x%08x\n",
(DWORD)(magic_divide[i].a >> 32), (DWORD)magic_divide[i].a, (DWORD)(magic_divide[i].b >> 32),
(DWORD)magic_divide[i].b, magic_divide[i].shift, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(magic_divide[i].result >> 32), (DWORD)magic_divide[i].result);
"call failed: RtlExtendedMagicDivide(0x%s, 0x%s, %d) has result 0x%s, expected 0x%s\n",
wine_dbgstr_longlong(magic_divide[i].a), wine_dbgstr_longlong(magic_divide[i].b), magic_divide[i].shift,
wine_dbgstr_longlong(result), wine_dbgstr_longlong(magic_divide[i].result));
}
}
@ -332,14 +331,12 @@ static void one_RtlInt64ToUnicodeString_test(int test_num, const largeint2str_t
} /* if */
} else {
ok(result == largeint2str->result,
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) has result %x, expected: %x\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value,
largeint2str->base, result, largeint2str->result);
"(test %d): RtlInt64ToUnicodeString(0x%s, %d, [out]) has result %x, expected: %x\n",
test_num, wine_dbgstr_longlong(largeint2str->value), largeint2str->base, result, largeint2str->result);
if (result == STATUS_SUCCESS) {
ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0',
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string \"%s\" is not NULL terminated\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value,
largeint2str->base, ansi_str.Buffer);
"(test %d): RtlInt64ToUnicodeString(0x%s, %d, [out]) string \"%s\" is not NULL terminated\n",
test_num, wine_dbgstr_longlong(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,
@ -347,12 +344,12 @@ static void one_RtlInt64ToUnicodeString_test(int test_num, const largeint2str_t
test_num, (DWORD)(largeint2str->value >>32), (DWORD)largeint2str->value, largeint2str->base,
ansi_str.Buffer, expected_ansi_str.Buffer);
ok(unicode_string.Length == expected_unicode_string.Length,
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string has Length %d, expected: %d\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
"(test %d): RtlInt64ToUnicodeString(0x%s, %d, [out]) string has Length %d, expected: %d\n",
test_num, wine_dbgstr_longlong(largeint2str->value), largeint2str->base,
unicode_string.Length, expected_unicode_string.Length);
ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength,
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string has MaximumLength %d, expected: %d\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
"(test %d): RtlInt64ToUnicodeString(0x%s, %d, [out]) string has MaximumLength %d, expected: %d\n",
test_num, wine_dbgstr_longlong(largeint2str->value), largeint2str->base,
unicode_string.MaximumLength, expected_unicode_string.MaximumLength);
pRtlFreeAnsiString(&expected_ansi_str);
pRtlFreeAnsiString(&ansi_str);
@ -392,12 +389,12 @@ 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(0x%x%08x, %d, %d, [out]) has result %x, expected: %x\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
"(test %d): RtlLargeIntegerToChar(0x%s, %d, %d, [out]) has result %x, expected: %x\n",
test_num, wine_dbgstr_longlong(largeint2str->value), largeint2str->base,
largeint2str->MaximumLength, result, largeint2str->result);
ok(memcmp(dest_str, largeint2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
"(test %d): RtlLargeIntegerToChar(0x%s, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
test_num, wine_dbgstr_longlong(largeint2str->value), largeint2str->base,
largeint2str->MaximumLength, dest_str, largeint2str->Buffer);
}
@ -415,26 +412,25 @@ 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(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n",
(DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, 20,
"(test a): RtlLargeIntegerToChar(0x%s, %d, %d, NULL) has result %x, expected: %x\n",
wine_dbgstr_longlong(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(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n",
(DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, 20,
"(test b): RtlLargeIntegerToChar(0x%s, %d, %d, NULL) has result %x, expected: %x\n",
wine_dbgstr_longlong(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(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n",
(DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value,
largeint2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW);
"(test c): RtlLargeIntegerToChar(0x%s, %d, %d, NULL) has result %x, expected: %x\n",
wine_dbgstr_longlong(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(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n",
(DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value,
"(test d): RtlLargeIntegerToChar(0x%s, %d, %d, NULL) has result %x, expected: %x\n",
wine_dbgstr_longlong(largeint2str[0].value),
largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION);
}

View File

@ -360,8 +360,8 @@ static void test_RtlUlonglongByteSwap(void)
result = pRtlUlonglongByteSwap( ((ULONGLONG)0x76543210 << 32) | 0x87654321 );
ok( (((ULONGLONG)0x21436587 << 32) | 0x10325476) == result,
"RtlUlonglongByteSwap(0x7654321087654321) returns 0x%x%08x, expected 0x2143658710325476\n",
(DWORD)(result >> 32), (DWORD)result);
"RtlUlonglongByteSwap(0x7654321087654321) returns 0x%s, expected 0x2143658710325476\n",
wine_dbgstr_longlong(result));
}
@ -602,11 +602,11 @@ static void test_RtlUniform(void)
seed_bak = seed;
result = pRtlUniform(&seed);
ok(result == expected,
"test: 0x%x%08x RtlUniform(&seed (seed == %x)) returns %x, expected %x\n",
(DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected);
"test: 0x%s RtlUniform(&seed (seed == %x)) returns %x, expected %x\n",
wine_dbgstr_longlong(num), seed_bak, result, expected);
ok(seed == expected,
"test: 0x%x%08x RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n",
(DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected);
"test: 0x%s RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n",
wine_dbgstr_longlong(num), seed_bak, result, expected);
} /* for */
/*
* Further investigation shows: In the different regions the highest bit
@ -649,11 +649,11 @@ static void test_RtlUniform(void)
seed_bak = seed;
result = pRtlUniform(&seed);
ok(result == expected,
"test: 0x%x%08x RtlUniform(&seed (seed == %x)) returns %x, expected %x\n",
(DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected);
"test: 0x%s RtlUniform(&seed (seed == %x)) returns %x, expected %x\n",
wine_dbgstr_longlong(num), seed_bak, result, expected);
ok(seed == expected,
"test: 0x%x%08x RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n",
(DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected);
"test: 0x%s RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n",
wine_dbgstr_longlong(num), seed_bak, result, expected);
} /* for */
/*
* More tests show that RtlUniform does not return 0x7ffffffd for seed values

View File

@ -425,15 +425,15 @@ static void test_RtlFindMostSignificantBit(void)
ulLong <<= i;
cPos = pRtlFindMostSignificantBit(ulLong);
ok (cPos == i, "didn't find MSB 0x%x%08x %d %d\n",
(DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
ok (cPos == i, "didn't find MSB 0x%s %d %d\n",
wine_dbgstr_longlong(ulLong ), i, cPos);
/* Set all bits lower than bit i */
ulLong = ((ulLong - 1) << 1) | 1;
cPos = pRtlFindMostSignificantBit(ulLong);
ok (cPos == i, "didn't find MSB 0x%x%08x %d %d\n",
(DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
ok (cPos == i, "didn't find MSB 0x%s %d %d\n",
wine_dbgstr_longlong(ulLong ), i, cPos);
}
cPos = pRtlFindMostSignificantBit(0);
ok (cPos == -1, "found bit when not set\n");
@ -453,14 +453,14 @@ static void test_RtlFindLeastSignificantBit(void)
ulLong = (ULONGLONG)1 << i;
cPos = pRtlFindLeastSignificantBit(ulLong);
ok (cPos == i, "didn't find LSB 0x%x%08x %d %d\n",
(DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
ok (cPos == i, "didn't find LSB 0x%s %d %d\n",
wine_dbgstr_longlong(ulLong ), i, cPos);
ulLong = ~((ULONGLONG)0) << i;
cPos = pRtlFindLeastSignificantBit(ulLong);
ok (cPos == i, "didn't find LSB 0x%x%08x %d %d\n",
(DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
ok (cPos == i, "didn't find LSB 0x%s %d %d\n",
wine_dbgstr_longlong(ulLong ), i, cPos);
}
cPos = pRtlFindLeastSignificantBit(0);
ok (cPos == -1, "found bit when not set\n");

View File

@ -600,22 +600,21 @@ 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(%08x%08x, [out], %d) has result %p, expected: %p\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
ulonglong2str->base, result, dest_str);
"(test %d): _i64toa(%s, [out], %d) has result %p, expected: %p\n",
test_num, wine_dbgstr_longlong(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(%08x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
"(test %d): _i64toa(%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, wine_dbgstr_longlong(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(%08x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
"(test %d): _i64toa(%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, wine_dbgstr_longlong(ulonglong2str->value),
ulonglong2str->base, dest_str, ulonglong2str->Buffer);
} /* if */
}
@ -630,12 +629,11 @@ 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(%08x%08x, [out], %d) has result %p, expected: %p\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
ulonglong2str->base, result, dest_str);
"(test %d): _ui64toa(%s, [out], %d) has result %p, expected: %p\n",
test_num, wine_dbgstr_longlong(ulonglong2str->value), ulonglong2str->base, result, dest_str);
ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): _ui64toa(%08x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
"(test %d): _ui64toa(%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, wine_dbgstr_longlong(ulonglong2str->value),
ulonglong2str->base, dest_str, ulonglong2str->Buffer);
}
@ -682,9 +680,8 @@ 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(0x%x%08x, [out], %d) has result %p, expected: %p\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
ulonglong2str->base, result, dest_wstr);
"(test %d): _i64tow(0x%s, [out], %d) has result %p, expected: %p\n",
test_num, wine_dbgstr_longlong(ulonglong2str->value), ulonglong2str->base, result, dest_wstr);
if (ulonglong2str->mask & 0x04) {
if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) {
for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
@ -693,15 +690,15 @@ 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(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
"(test %d): _i64tow(0x%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, wine_dbgstr_longlong(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(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
"(test %d): _i64tow(0x%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, wine_dbgstr_longlong(ulonglong2str->value),
ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
} /* if */
pRtlFreeAnsiString(&ansi_str);
@ -733,12 +730,12 @@ 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(0x%x%08x, [out], %d) has result %p, expected: %p\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
"(test %d): _ui64tow(0x%s, [out], %d) has result %p, expected: %p\n",
test_num, wine_dbgstr_longlong(ulonglong2str->value),
ulonglong2str->base, result, dest_wstr);
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _ui64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
"(test %d): _ui64tow(0x%s, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, wine_dbgstr_longlong(ulonglong2str->value),
ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
}
@ -764,8 +761,8 @@ static void test_ulonglongtow(void)
/* Crashes on XP and W2K3 */
result = p_i64tow(ulonglong2str[0].value, NULL, 10);
ok(result == NULL,
"(test d): _i64tow(0x%x%08x, NULL, 10) has result %p, expected: NULL\n",
(DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result);
"(test d): _i64tow(0x%s, NULL, 10) has result %p, expected: NULL\n",
wine_dbgstr_longlong(ulonglong2str[0].value), result);
}
if (p_ui64tow) {
@ -773,8 +770,8 @@ static void test_ulonglongtow(void)
/* Crashes on XP and W2K3 */
result = p_ui64tow(ulonglong2str[0].value, NULL, 10);
ok(result == NULL,
"(test e): _ui64tow(0x%x%08x, NULL, 10) has result %p, expected: NULL\n",
(DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result);
"(test e): _ui64tow(0x%s, NULL, 10) has result %p, expected: NULL\n",
wine_dbgstr_longlong(ulonglong2str[0].value), result);
}
} /* if */
}
@ -1085,14 +1082,14 @@ static void test_atoi64(void)
ok(result == str2longlong[test_num].value ||
(result == ((str2longlong[test_num].overflow == -1) ?
ULL(0x80000000,0x00000000) : ULL(0x7fffffff,0xffffffff))),
"(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
"(test %d): call failed: _atoi64(\"%s\") has result 0x%s, expected: 0x%s\n",
test_num, str2longlong[test_num].str, wine_dbgstr_longlong(result),
wine_dbgstr_longlong(str2longlong[test_num].value));
else
ok(result == str2longlong[test_num].value,
"(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
"(test %d): call failed: _atoi64(\"%s\") has result 0x%s, expected: 0x%s\n",
test_num, str2longlong[test_num].str, wine_dbgstr_longlong(result),
wine_dbgstr_longlong(str2longlong[test_num].value));
}
}
@ -1110,14 +1107,14 @@ static void test_wtoi64(void)
ok(result == str2longlong[test_num].value ||
(result == ((str2longlong[test_num].overflow == -1) ?
ULL(0x80000000,0x00000000) : ULL(0x7fffffff,0xffffffff))),
"(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
"(test %d): call failed: _atoi64(\"%s\") has result 0x%s, expected: 0x%s\n",
test_num, str2longlong[test_num].str, wine_dbgstr_longlong(result),
wine_dbgstr_longlong(str2longlong[test_num].value));
else
ok(result == str2longlong[test_num].value,
"(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
"(test %d): call failed: _atoi64(\"%s\") has result 0x%s, expected: 0x%s\n",
test_num, str2longlong[test_num].str, wine_dbgstr_longlong(result),
wine_dbgstr_longlong(str2longlong[test_num].value));
pRtlFreeUnicodeString(&uni);
}
}