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\n",
- magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift, result, magic_divide[i].result);
+ "call failed: RtlExtendedMagicDivide(0x%lx%08lx, 0x%lx%08lx, %d) has result 0x%lx%08lx, expected 0x%lx%08lx\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);
}
}
} /* if */
} else {
ok(result == largeint2str->result,
- "(test %d): RtlInt64ToUnicodeString(%llu, %d, [out]) has result %lx, expected: %lx\n",
- test_num, largeint2str->value, largeint2str->base, result, largeint2str->result);
+ "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) has result %lx, expected: %lx\n",
+ test_num, (DWORD)(largeint2str->value >> 32), (DWORD)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\n",
- test_num, largeint2str->value, largeint2str->base, ansi_str.Buffer);
+ "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string \"%s\" is not NULL terminated\n",
+ test_num, (DWORD)(largeint2str->value >> 32), (DWORD)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\"\n",
- test_num, largeint2str->value, largeint2str->base, ansi_str.Buffer, expected_ansi_str.Buffer);
+ "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
+ 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(%llu, %d, [out]) string has Length %d, expected: %d\n",
- test_num, largeint2str->value, largeint2str->base, unicode_string.Length, expected_unicode_string.Length);
+ "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string has Length %d, expected: %d\n",
+ test_num, (DWORD)(largeint2str->value >> 32), (DWORD)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\n",
- test_num, largeint2str->value, largeint2str->base, unicode_string.MaximumLength, expected_unicode_string.MaximumLength);
+ "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string has MaximumLength %d, expected: %d\n",
+ test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
+ unicode_string.MaximumLength, expected_unicode_string.MaximumLength);
pRtlFreeAnsiString(&expected_ansi_str);
pRtlFreeAnsiString(&ansi_str);
}
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\n",
- test_num, largeint2str->value, largeint2str->base, largeint2str->MaximumLength, result, largeint2str->result);
+ "(test %d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, [out]) has result %lx, expected: %lx\n",
+ test_num, (DWORD)(largeint2str->value >> 32), (DWORD)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\"\n",
- test_num, largeint2str->value, largeint2str->base, largeint2str->MaximumLength, dest_str, largeint2str->Buffer);
+ "(test %d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
+ test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
+ largeint2str->MaximumLength, dest_str, largeint2str->Buffer);
}
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: %lx\n",
- largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER);
+ "(test a): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n",
+ (DWORD)(largeint2str[0].value >> 32), (DWORD)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: %lx\n",
- largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER);
+ "(test b): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n",
+ (DWORD)(largeint2str[0].value >> 32), (DWORD)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: %lx\n",
- largeint2str[0].value, largeint2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW);
+ "(test c): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n",
+ (DWORD)(largeint2str[0].value >> 32), (DWORD)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: %lx\n",
- largeint2str[0].value, largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION);
+ "(test d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n",
+ (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value,
+ largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION);
}
result = pRtlUlonglongByteSwap( ((ULONGLONG)0x76543210 << 32) | 0x87654321 );
ok( (((ULONGLONG)0x21436587 << 32) | 0x10325476) == result,
- "RtlUlonglongByteSwap(0x7654321087654321) returns 0x%llx, expected 0x2143658710325476\n",
- result);
+ "RtlUlonglongByteSwap(0x7654321087654321) returns 0x%lx%08lx, expected 0x2143658710325476\n",
+ (DWORD)(result >> 32), (DWORD)result);
}
seed_bak = seed;
result = pRtlUniform(&seed);
ok(result == expected,
- "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
- num, seed_bak, result, expected);
+ "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
+ (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected);
ok(seed == expected,
- "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
- num, seed_bak, seed, expected);
+ "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
+ (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected);
} /* for */
/*
* Further investigation shows: In the different regions the highest bit
seed_bak = seed;
result = pRtlUniform(&seed);
ok(result == expected,
- "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
- num, seed_bak, result, expected);
+ "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
+ (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected);
ok(seed == expected,
- "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
- num, seed_bak, seed, expected);
+ "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
+ (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected);
} /* for */
/*
* More tests show that RtlUniform does not return 0x7ffffffd for seed values
} /* if */
result = pRtlRandom(&seed);
ok(result == result_expected,
- "test: %llu RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
- num, seed_bak, result, result_expected);
+ "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n",
+ (DWORD)(num >> 32), (DWORD)num, seed_bak, result, result_expected);
ok(seed == seed_expected,
- "test: %llu RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
- num, seed_bak, seed, seed_expected);
+ "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n",
+ (DWORD)(num >> 32), (DWORD)num, seed_bak, result, seed_expected);
} /* for */
}
ulLong <<= i;
cPos = pRtlFindMostSignificantBit(ulLong);
- ok (cPos == i, "didn't find MSB %llx %d %d\n", ulLong, i, cPos);
+ ok (cPos == i, "didn't find MSB 0x%lx%08lx %d %d\n",
+ (DWORD)(ulLong >> 32), (DWORD)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 %llx %d %d\n", ulLong, i, cPos);
+ ok (cPos == i, "didn't find MSB 0x%lx%08lx %d %d\n",
+ (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
}
cPos = pRtlFindMostSignificantBit(0);
ok (cPos == -1, "found bit when not set\n");
ulLong = (ULONGLONG)1 << i;
cPos = pRtlFindLeastSignificantBit(ulLong);
- ok (cPos == i, "didn't find LSB %llx %d %d\n", ulLong, i, cPos);
+ ok (cPos == i, "didn't find LSB 0x%lx%08lx %d %d\n",
+ (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
ulLong = ~((ULONGLONG)0) << i;
cPos = pRtlFindLeastSignificantBit(ulLong);
- ok (cPos == i, "didn't find LSB %llx %d %d\n", ulLong, i, cPos);
+ ok (cPos == i, "didn't find LSB 0x%lx%08lx %d %d\n",
+ (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
}
cPos = pRtlFindLeastSignificantBit(0);
ok (cPos == -1, "found bit when not set\n");
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\n",
- test_num, ulonglong2str->value, ulonglong2str->base, result, dest_wstr);
+ "(test %d): _i64tow(0x%lx%08lx, [out], %d) has result %p, expected: %p\n",
+ test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)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++) {
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\"\n",
- test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
+ "(test %d): _i64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
+ test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)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\"\n",
- test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
+ "(test %d): _i64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
+ test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
+ ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
} /* if */
pRtlFreeAnsiString(&ansi_str);
}
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\n",
- test_num, ulonglong2str->value, ulonglong2str->base, result, dest_wstr);
+ "(test %d): _ui64tow(0x%lx%08lx, [out], %d) has result %p, expected: %p\n",
+ test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)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\"\n",
- test_num, ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
+ "(test %d): _ui64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
+ test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
+ ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
}
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\n",
- ulonglong2str[0].value, result);
+ "(test d): _i64tow(0x%lx%08lx, NULL, 10) has result %p, expected: NULL\n",
+ (DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result);
if (p_ui64tow) {
for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
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\n",
- ulonglong2str[0].value, result);
+ "(test e): _ui64tow(0x%lx%08lx, NULL, 10) has result %p, expected: NULL\n",
+ (DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result);
} /* if */
}
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\n",
- test_num, str2longlong[test_num].str, result, str2longlong[test_num].value);
+ "(test %d): call failed: _atoi64(\"%s\") has result 0x%lx%08lx, expected: 0x%lx%08lx\n",
+ test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
+ (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
} /* for */
}
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\n",
- test_num, str2longlong[test_num].str, result, str2longlong[test_num].value);
+ "(test %d): call failed: _wtoi64(\"%s\") has result 0x%lx%08lx, expected: 0x%lx%08lx\n",
+ test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
+ (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
pRtlFreeUnicodeString(&uni);
} /* for */
}