new shlwapi tests

Alexandre Julliard julliard at winehq.org
Thu Sep 25 14:42:43 CDT 2003


Jon Griffiths <jon_p_griffiths at yahoo.com> writes:

> +static const StrFormatSizeResult StrFormatSize_results[] = {
> +  { -1023, "-1023 bytes", "0 KB"},
> +  { -24, "-24 bytes", "0 KB"},
> +  { 309, "309 bytes", "1 KB"},
> +  { 10191, "9.95 KB", "10 KB"},
> +  { 100353, "98.0 KB", "99 KB"},
> +  { 1022286, "998 KB", "999 KB"},
> +  { 1046862, "0.99 MB", "1,023 KB"},
> +  { 1048574619, "999 MB", "1,023,999 KB"},
> +  { 1073741775, "0.99 GB", "1,048,576 KB"},
> +  { 1073741822286, "999 GB", "1,048,575,999 KB"},
> +  { 1099511626395, "0.99 TB", "1,073,741,823 KB"},
> +  { 1099511627774619, "999 TB", "1,073,741,823,999 KB"},
> +  { 1125899906841576, "0.99 PB", "1,099,511,627,775 KB"},
> +  { 1125899906842623285, "999 PB", "1,099,511,627,776,000 KB"},
> +  { 1152921504606845595, "0.99 EB", "1,125,899,906,842,623 KB"},

Please don't use long long constants, that's not portable, they should
be computed instead. Check the ntdll tests for how this can be done.

-- 
Alexandre Julliard
julliard at winehq.com



More information about the wine-devel mailing list