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
66414c46
Commit
66414c46
authored
Jun 11, 2013
by
Christian Costa
Committed by
Alexandre Julliard
Jun 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof/tests: Add test for case sensitive 'indexColor' type.
parent
71986eb1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
0 deletions
+82
-0
xfile.c
dlls/d3dx9_36/tests/xfile.c
+35
-0
d3dxof.c
dlls/d3dxof/tests/d3dxof.c
+47
-0
No files found.
dlls/d3dx9_36/tests/xfile.c
View file @
66414c46
...
@@ -62,6 +62,24 @@ static char object_noname[] =
...
@@ -62,6 +62,24 @@ static char object_noname[] =
"1; 2; 3;
\n
"
"1; 2; 3;
\n
"
"}
\n
"
;
"}
\n
"
;
static
char
template_using_index_color_lower
[]
=
"xof 0302txt 0064
\n
"
"template MeshVertexColors
\n
"
"{
\n
"
"<1630B821-7842-11cf-8F52-0040333594A3>
\n
"
"DWORD nVertexColors;
\n
"
"array indexColor vertexColors[nVertexColors];
\n
"
"}
\n
"
;
static
char
template_using_index_color_upper
[]
=
"xof 0302txt 0064
\n
"
"template MeshVertexColors
\n
"
"{
\n
"
"<1630B821-7842-11cf-8F52-0040333594A3>
\n
"
"DWORD nVertexColors;
\n
"
"array IndexColor vertexColors[nVertexColors];
\n
"
"}
\n
"
;
static
void
test_templates
(
void
)
static
void
test_templates
(
void
)
{
{
ID3DXFile
*
d3dxfile
;
ID3DXFile
*
d3dxfile
;
...
@@ -207,7 +225,23 @@ static void test_getname(void)
...
@@ -207,7 +225,23 @@ static void test_getname(void)
data_object
->
lpVtbl
->
Release
(
data_object
);
data_object
->
lpVtbl
->
Release
(
data_object
);
enum_object
->
lpVtbl
->
Release
(
enum_object
);
enum_object
->
lpVtbl
->
Release
(
enum_object
);
d3dxfile
->
lpVtbl
->
Release
(
d3dxfile
);
d3dxfile
->
lpVtbl
->
Release
(
d3dxfile
);
}
static
void
test_type_index_color
(
void
)
{
ID3DXFile
*
d3dxfile
;
HRESULT
ret
;
ret
=
D3DXFileCreate
(
&
d3dxfile
);
ok
(
ret
==
S_OK
,
"D3DXCreateFile failed with %#x
\n
"
,
ret
);
/* Test that 'indexColor' can be used (same as IndexedColor in standard templates) and is case sensitive */
ret
=
d3dxfile
->
lpVtbl
->
RegisterTemplates
(
d3dxfile
,
template_using_index_color_lower
,
sizeof
(
template_using_index_color_lower
)
-
1
);
todo_wine
ok
(
ret
==
S_OK
,
"RegisterTemplates failed with %#x
\n
"
,
ret
);
ret
=
d3dxfile
->
lpVtbl
->
RegisterTemplates
(
d3dxfile
,
template_using_index_color_upper
,
sizeof
(
template_using_index_color_upper
)
-
1
);
ok
(
ret
==
D3DXFERR_PARSEERROR
,
"RegisterTemplates returned %#x instead of %#x
\n
"
,
ret
,
D3DXFERR_PARSEERROR
);
d3dxfile
->
lpVtbl
->
Release
(
d3dxfile
);
}
}
static
inline
void
debugstr_guid
(
char
*
buf
,
const
GUID
*
id
)
static
inline
void
debugstr_guid
(
char
*
buf
,
const
GUID
*
id
)
...
@@ -361,5 +395,6 @@ START_TEST(xfile)
...
@@ -361,5 +395,6 @@ START_TEST(xfile)
test_templates
();
test_templates
();
test_lock_unlock
();
test_lock_unlock
();
test_getname
();
test_getname
();
test_type_index_color
();
test_dump
();
test_dump
();
}
}
dlls/d3dxof/tests/d3dxof.c
View file @
66414c46
...
@@ -376,6 +376,24 @@ static char object_complex[] =
...
@@ -376,6 +376,24 @@ static char object_complex[] =
"3;;;, 3;;;, 1;;;, 2;;;,
\n
"
"3;;;, 3;;;, 1;;;, 2;;;,
\n
"
"}
\n
"
;
"}
\n
"
;
static
char
template_using_index_color_lower
[]
=
"xof 0302txt 0064
\n
"
"template MeshVertexColors
\n
"
"{
\n
"
"<1630B821-7842-11cf-8F52-0040333594A3>
\n
"
"DWORD nVertexColors;
\n
"
"array indexColor vertexColors[nVertexColors];
\n
"
"}
\n
"
;
static
char
template_using_index_color_upper
[]
=
"xof 0302txt 0064
\n
"
"template MeshVertexColors
\n
"
"{
\n
"
"<1630B821-7842-11cf-8F52-0040333594A3>
\n
"
"DWORD nVertexColors;
\n
"
"array IndexColor vertexColors[nVertexColors];
\n
"
"}
\n
"
;
static
void
init_function_pointers
(
void
)
static
void
init_function_pointers
(
void
)
{
{
/* We have to use LoadLibrary as no d3dxof functions are referenced directly */
/* We have to use LoadLibrary as no d3dxof functions are referenced directly */
...
@@ -1064,6 +1082,34 @@ static void test_standard_templates(void)
...
@@ -1064,6 +1082,34 @@ static void test_standard_templates(void)
IDirectXFile_Release
(
dxfile
);
IDirectXFile_Release
(
dxfile
);
}
}
static
void
test_type_index_color
(
void
)
{
HRESULT
ret
;
IDirectXFile
*
dxfile
=
NULL
;
if
(
!
pDirectXFileCreate
)
{
win_skip
(
"DirectXFileCreate is not available
\n
"
);
return
;
}
ret
=
pDirectXFileCreate
(
&
dxfile
);
ok
(
ret
==
DXFILE_OK
,
"DirectXFileCreate failed with %#x
\n
"
,
ret
);
if
(
!
dxfile
)
{
skip
(
"Couldn't create DirectXFile interface
\n
"
);
return
;
}
/* Test that 'indexColor' can be used (same as IndexedColor in standard templates) and is case sensitive */
ret
=
IDirectXFile_RegisterTemplates
(
dxfile
,
template_using_index_color_lower
,
sizeof
(
template_using_index_color_lower
)
-
1
);
todo_wine
ok
(
ret
==
DXFILE_OK
,
"IDirectXFileImpl_RegisterTemplates failed with %#x
\n
"
,
ret
);
ret
=
IDirectXFile_RegisterTemplates
(
dxfile
,
template_using_index_color_upper
,
sizeof
(
template_using_index_color_upper
)
-
1
);
ok
(
ret
==
DXFILEERR_PARSEERROR
,
"IDirectXFileImpl_RegisterTemplates returned %#x instead of %#x
\n
"
,
ret
,
DXFILEERR_PARSEERROR
);
IDirectXFile_Release
(
dxfile
);
}
/* Set it to 1 to expand the string when dumping the object. This is useful when there is
/* Set it to 1 to expand the string when dumping the object. This is useful when there is
* only one string in a sub-object (very common). Use with care, this may lead to a crash. */
* only one string in a sub-object (very common). Use with care, this may lead to a crash. */
#define EXPAND_STRING 0
#define EXPAND_STRING 0
...
@@ -1250,6 +1296,7 @@ START_TEST(d3dxof)
...
@@ -1250,6 +1296,7 @@ START_TEST(d3dxof)
test_syntax_semicolon_comma
();
test_syntax_semicolon_comma
();
test_complex_object
();
test_complex_object
();
test_standard_templates
();
test_standard_templates
();
test_type_index_color
();
test_dump
();
test_dump
();
FreeLibrary
(
hd3dxof
);
FreeLibrary
(
hd3dxof
);
...
...
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