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
692783a9
Commit
692783a9
authored
Apr 28, 2013
by
Christian Costa
Committed by
Alexandre Julliard
Apr 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Add some template tests.
parent
123fd68b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
d3dxof.c
dlls/d3dxof/tests/d3dxof.c
+54
-0
No files found.
dlls/d3dxof/tests/d3dxof.c
View file @
692783a9
...
...
@@ -140,6 +140,22 @@ static char object_syntax_string_with_separator[] =
"
\"
foo;bar
\"
;
\n
"
"}
\n
"
;
static
char
templates_bad_file_type1
[]
=
"xOf 0302txt 0064
\n
"
;
static
char
templates_bad_file_version
[]
=
"xof 0102txt 0064
\n
"
;
static
char
templates_bad_file_type2
[]
=
"xof 0302foo 0064
\n
"
;
static
char
templates_bad_file_float_size
[]
=
"xof 0302txt 0050
\n
"
;
static
char
templates_parse_error
[]
=
"xof 0302txt 0064"
"foobar;
\n
"
;
static
void
init_function_pointers
(
void
)
{
/* We have to use LoadLibrary as no d3dxof functions are referenced directly */
...
...
@@ -379,6 +395,43 @@ static void test_file_types(void)
IDirectXFile_Release
(
dxfile
);
}
static
void
test_templates
(
void
)
{
HRESULT
ret
;
IDirectXFile
*
dxfile
=
NULL
;
if
(
!
pDirectXFileCreate
)
{
win_skip
(
"DirectXFileCreate is not available
\n
"
);
return
;
}
ret
=
pDirectXFileCreate
(
&
dxfile
);
ok
(
ret
==
DXFILE_OK
,
"DirectXFileCreate: %x
\n
"
,
ret
);
if
(
!
dxfile
)
{
skip
(
"Couldn't create DirectXFile interface
\n
"
);
return
;
}
ret
=
IDirectXFile_RegisterTemplates
(
dxfile
,
templates_bad_file_type1
,
sizeof
(
templates_bad_file_type1
)
-
1
);
ok
(
ret
==
DXFILEERR_BADFILETYPE
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
DXFILEERR_BADFILETYPE
);
ret
=
IDirectXFile_RegisterTemplates
(
dxfile
,
templates_bad_file_version
,
sizeof
(
templates_bad_file_version
)
-
1
);
ok
(
ret
==
DXFILEERR_BADFILEVERSION
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
DXFILEERR_BADFILEVERSION
);
ret
=
IDirectXFile_RegisterTemplates
(
dxfile
,
templates_bad_file_type2
,
sizeof
(
templates_bad_file_type2
)
-
1
);
ok
(
ret
==
DXFILEERR_BADFILETYPE
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
DXFILEERR_BADFILETYPE
);
ret
=
IDirectXFile_RegisterTemplates
(
dxfile
,
templates_bad_file_float_size
,
sizeof
(
templates_bad_file_float_size
)
-
1
);
ok
(
ret
==
DXFILEERR_BADFILEFLOATSIZE
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
DXFILEERR_BADFILEFLOATSIZE
);
ret
=
IDirectXFile_RegisterTemplates
(
dxfile
,
templates_parse_error
,
sizeof
(
templates_parse_error
)
-
1
);
todo_wine
ok
(
ret
==
DXFILEERR_PARSEERROR
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
DXFILEERR_PARSEERROR
);
IDirectXFile_Release
(
dxfile
);
}
static
void
test_compressed_files
(
void
)
{
HRESULT
hr
;
...
...
@@ -788,6 +841,7 @@ START_TEST(d3dxof)
test_refcount
();
test_CreateEnumObject
();
test_file_types
();
test_templates
();
test_compressed_files
();
test_getname
();
test_syntax
();
...
...
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