25#define DO_TEST(exp, str) \
27 StrFormatByteSizeW(exp, lpszDest, cchMax);\
28 if (lpszDest[1] == L',') lpszDest[1] = L'.';\
29 ok(_wcsicmp(lpszDest, (str)) == 0, "Expected %s got %s\n",\
30 wine_dbgstr_w((str)), wine_dbgstr_w((lpszDest)));\
53 if (pGetThreadUILanguage)
55 if (pGetUserDefaultUILanguage)
79 skip(
"An English UI and locale is required for the StrFormat*Size tests\n");
91 DO_TEST(1125899906842624,
L"1.00 PB");
92 DO_TEST(1152921504606846976,
L"1.00 EB");
93 DO_TEST(2305843009213693952,
L"2.00 EB");
94 DO_TEST(4611686018427387904,
L"4.00 EB");
95 DO_TEST(0x7fffffffffffffff,
L"7.99 EB");
96 DO_TEST(0x8000000000000000,
L"0 bytes");
97 DO_TEST(0xffffffff00000000,
L"0 bytes");
98 DO_TEST(0xffffffff00000001,
L"1 bytes");
99 DO_TEST(0xffffffff70000000,
L"1879048192 bytes");
100 DO_TEST(0xffffffff7fffffff,
L"2147483647 bytes");
101 DO_TEST(0xffffffff80000000,
L"-2147483648 bytes");
102 DO_TEST(0xffffffff80000001,
L"-2147483647 bytes");
103 DO_TEST(0xffffffff90000000,
L"-1879048192 bytes");
104 DO_TEST(-1073741824,
L"-1073741824 bytes");
105 DO_TEST(-1048576,
L"-1048576 bytes");
107 DO_TEST(0xffffffffffffffff,
L"-1 bytes");
119 DO_TEST(-1099511627776,
L"0 bytes");
120 DO_TEST(-1152921504606846976,
L"0 bytes");
#define GetProcAddress(x, y)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
LANGID WINAPI GetUserDefaultLangID(void)
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
static HINSTANCE hkernel32