Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ec0e9d0d
Commit
ec0e9d0d
authored
Jul 18, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Fix Win98 SE test failures for StrFormatKBSizeA/W.
parent
a4ea347f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
string.c
dlls/shlwapi/tests/string.c
+20
-11
No files found.
dlls/shlwapi/tests/string.c
View file @
ec0e9d0d
...
...
@@ -107,6 +107,8 @@ typedef struct tagStrFormatSizeResult
LONGLONG
value
;
const
char
*
byte_size_64
;
const
char
*
kb_size
;
int
kb_size_broken
;
const
char
*
kb_size2
;
}
StrFormatSizeResult
;
...
...
@@ -117,15 +119,15 @@ static const StrFormatSizeResult StrFormatSize_results[] = {
{
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"
},
{
((
LONGLONG
)
0x000000f9
<<
32
)
|
0xfffff94e
,
"999 GB"
,
"1,048,575,999 KB"
},
{
((
LONGLONG
)
0x000000ff
<<
32
)
|
0xfffffa9b
,
"0.99 TB"
,
"1,073,741,823 KB"
},
{
((
LONGLONG
)
0x0003e7ff
<<
32
)
|
0xfffffa9b
,
"999 TB"
,
"1,073,741,823,999 KB"
},
{
((
LONGLONG
)
0x0003ffff
<<
32
)
|
0xfffffbe8
,
"0.99 PB"
,
"1,099,511,627,775 KB"
},
{
((
LONGLONG
)
0x0f9fffff
<<
32
)
|
0xfffffd35
,
"999 PB"
,
"1,099,511,627,776,000 KB"
},
{
((
LONGLONG
)
0x0fffffff
<<
32
)
|
0xfffffa9b
,
"0.99 EB"
,
"1,125,899,906,842,623 KB"
},
{
1046862
,
"0.99 MB"
,
"1,023 KB"
,
1
,
"1023 KB"
},
{
1048574619
,
"999 MB"
,
"1,023,999 KB"
,
1
,
"1023999 KB"
},
{
1073741775
,
"0.99 GB"
,
"1,048,576 KB"
,
1
,
"1048576 KB"
},
{
((
LONGLONG
)
0x000000f9
<<
32
)
|
0xfffff94e
,
"999 GB"
,
"1,048,575,999 KB"
,
1
,
"1048575999 KB"
},
{
((
LONGLONG
)
0x000000ff
<<
32
)
|
0xfffffa9b
,
"0.99 TB"
,
"1,073,741,823 KB"
,
1
,
"1073741823 KB"
},
{
((
LONGLONG
)
0x0003e7ff
<<
32
)
|
0xfffffa9b
,
"999 TB"
,
"1,073,741,823,999 KB"
,
1
,
"4294967295 KB"
},
{
((
LONGLONG
)
0x0003ffff
<<
32
)
|
0xfffffbe8
,
"0.99 PB"
,
"1,099,511,627,775 KB"
,
1
,
"4294967295 KB"
},
{
((
LONGLONG
)
0x0f9fffff
<<
32
)
|
0xfffffd35
,
"999 PB"
,
"1,099,511,627,776,000 KB"
,
1
,
"0 KB"
},
{
((
LONGLONG
)
0x0fffffff
<<
32
)
|
0xfffffa9b
,
"0.99 EB"
,
"1,125,899,906,842,623 KB"
,
1
,
"4294967295 KB"
},
{
0
,
NULL
,
NULL
}
};
...
...
@@ -560,7 +562,11 @@ static void test_StrFormatKBSizeW(void)
{
pStrFormatKBSizeW
(
result
->
value
,
szBuffW
,
256
);
WideCharToMultiByte
(
0
,
0
,
szBuffW
,
-
1
,
szBuff
,
sizeof
(
szBuff
)
/
sizeof
(
WCHAR
),
0
,
0
);
ok
(
!
strcmp
(
result
->
kb_size
,
szBuff
),
/* shlwapi on Win98 SE does not appear to apply delimiters to the output
* and does not correctly handle extremely large values. */
ok
(
!
strcmp
(
result
->
kb_size
,
szBuff
)
||
(
result
->
kb_size_broken
&&
!
strcmp
(
result
->
kb_size2
,
szBuff
)),
"Formatted %x%08x wrong: got %s, expected %s
\n
"
,
(
LONG
)(
result
->
value
>>
32
),
(
LONG
)
result
->
value
,
szBuff
,
result
->
kb_size
);
result
++
;
...
...
@@ -582,7 +588,10 @@ static void test_StrFormatKBSizeA(void)
{
pStrFormatKBSizeA
(
result
->
value
,
szBuff
,
256
);
ok
(
!
strcmp
(
result
->
kb_size
,
szBuff
),
/* shlwapi on Win98 SE does not appear to apply delimiters to the output
* and does not correctly handle extremely large values. */
ok
(
!
strcmp
(
result
->
kb_size
,
szBuff
)
||
(
result
->
kb_size_broken
&&
!
strcmp
(
result
->
kb_size2
,
szBuff
)),
"Formatted %x%08x wrong: got %s, expected %s
\n
"
,
(
LONG
)(
result
->
value
>>
32
),
(
LONG
)
result
->
value
,
szBuff
,
result
->
kb_size
);
result
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment