Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
41fdff86
Commit
41fdff86
authored
Mar 08, 2010
by
Christian Costa
Committed by
Alexandre Julliard
Mar 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Fix tzip and bzip files tests on all windows platform.
parent
d3369086
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
d3dxof.c
dlls/d3dxof/tests/d3dxof.c
+19
-10
No files found.
dlls/d3dxof/tests/d3dxof.c
View file @
41fdff86
...
...
@@ -55,8 +55,15 @@ char object[] =
char
empty_txt_file
[]
=
"xof 0302txt 0064"
;
char
empty_bin_file
[]
=
"xof 0302bin 0064"
;
char
empty_tzip_file
[]
=
"xof 0302tzip0064"
;
char
empty_bzip_file
[]
=
"xof 0302bzip0064"
;
/* MSZip data is generated with the command "MAKECAB.EXE /D Compress=ON /D CompressionType=MSZip file packed"
* Data in cab is after the filename (null terminated) and the 32-bit checksum:
* size (16-bit), packed_size (16-bit) and compressed data (with leading 16-bit CK signature)
* Data in x files is preceding by 2 16-bit words: size with xof header (16 bytes) and a 0 value
* It does not seem possible to generate a MSZip data with no byte, so put just 1 byte here */
/* "\n" packed with MSZip => not text */
char
empty_tzip_file
[]
=
"xof 0302tzip0064
\x11\x00\x00\x00\x01\x00\x05\x00\x43\x4b\xe3\x02\x00
"
;
/* "\n" packed with MSZip => not token (token are 16-bit and there is only 1 byte) */
char
empty_bzip_file
[]
=
"xof 0302bzip0064
\x11\x00\x00\x00\x01\x00\x05\x00\x43\x4b\xe3\x02\x00
"
;
char
empty_cmp_file
[]
=
"xof 0302cmp 0064"
;
char
empty_xxxx_file
[]
=
"xof 0302xxxx0064"
;
...
...
@@ -224,11 +231,11 @@ static void test_file_types(void)
hr
=
IDirectXFile_RegisterTemplates
(
dxfile
,
empty_bin_file
,
strlen
(
empty_bin_file
));
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileImpl_RegisterTemplates: %x
\n
"
,
hr
);
hr
=
IDirectXFile_RegisterTemplates
(
dxfile
,
empty_tzip_file
,
s
trlen
(
empty_tzip_file
)
);
ok
(
hr
==
DXFILEERR_BADALLOC
,
"IDirectXFileImpl_RegisterTemplates: %x
\n
"
,
hr
);
hr
=
IDirectXFile_RegisterTemplates
(
dxfile
,
empty_tzip_file
,
s
izeof
(
empty_tzip_file
)
-
1
);
todo_wine
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileImpl_RegisterTemplates: %x
\n
"
,
hr
);
hr
=
IDirectXFile_RegisterTemplates
(
dxfile
,
empty_bzip_file
,
s
trlen
(
empty_bzip_file
)
);
ok
(
hr
==
DXFILEERR_BADALLOC
,
"IDirectXFileImpl_RegisterTemplates: %x
\n
"
,
hr
);
hr
=
IDirectXFile_RegisterTemplates
(
dxfile
,
empty_bzip_file
,
s
izeof
(
empty_bzip_file
)
-
1
);
todo_wine
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileImpl_RegisterTemplates: %x
\n
"
,
hr
);
hr
=
IDirectXFile_RegisterTemplates
(
dxfile
,
empty_cmp_file
,
strlen
(
empty_cmp_file
));
ok
(
hr
==
DXFILEERR_BADFILETYPE
,
"IDirectXFileImpl_RegisterTemplates: %x
\n
"
,
hr
);
...
...
@@ -249,14 +256,16 @@ static void test_file_types(void)
if
(
hr
==
DXFILE_OK
)
IDirectXFileEnumObject_Release
(
enum_object
);
lminfo
.
lpMemory
=
empty_tzip_file
;
lminfo
.
dSize
=
s
trlen
(
empty_tzip_file
)
;
lminfo
.
dSize
=
s
izeof
(
empty_tzip_file
)
-
1
;
hr
=
IDirectXFile_CreateEnumObject
(
dxfile
,
&
lminfo
,
DXFILELOAD_FROMMEMORY
,
&
enum_object
);
ok
(
hr
==
DXFILEERR_BADALLOC
,
"IDirectXFile_CreateEnumObject: %x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
DXFILE_OK
,
"IDirectXFile_CreateEnumObject: %x
\n
"
,
hr
);
if
(
hr
==
DXFILE_OK
)
IDirectXFileEnumObject_Release
(
enum_object
);
lminfo
.
lpMemory
=
empty_bzip_file
;
lminfo
.
dSize
=
s
trlen
(
empty_bzip_file
)
;
lminfo
.
dSize
=
s
izeof
(
empty_bzip_file
)
-
1
;
hr
=
IDirectXFile_CreateEnumObject
(
dxfile
,
&
lminfo
,
DXFILELOAD_FROMMEMORY
,
&
enum_object
);
ok
(
hr
==
DXFILEERR_BADALLOC
,
"IDirectXFile_CreateEnumObject: %x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
DXFILE_OK
,
"IDirectXFile_CreateEnumObject: %x
\n
"
,
hr
);
if
(
hr
==
DXFILE_OK
)
IDirectXFileEnumObject_Release
(
enum_object
);
lminfo
.
lpMemory
=
empty_cmp_file
;
lminfo
.
dSize
=
strlen
(
empty_cmp_file
);
...
...
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