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
bdf8e464
Commit
bdf8e464
authored
Dec 21, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Dec 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add effect parameter value GetBool() test.
parent
8a58fb3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
effect.c
dlls/d3dx9_36/tests/effect.c
+31
-0
No files found.
dlls/d3dx9_36/tests/effect.c
View file @
bdf8e464
...
...
@@ -21,6 +21,12 @@
#include "wine/test.h"
#include "d3dx9.h"
/* helper functions */
static
inline
BOOL
get_bool
(
LPCVOID
data
)
{
return
(
*
(
BOOL
*
)
data
)
?
TRUE
:
FALSE
;
}
static
const
char
effect_desc
[]
=
"Technique
\n
"
"{
\n
"
...
...
@@ -502,6 +508,30 @@ static void test_effect_parameter_value_GetValue(const struct test_effect_parame
}
}
static
void
test_effect_parameter_value_GetBool
(
const
struct
test_effect_parameter_value_result
*
res
,
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
BOOL
bvalue
=
0xabababab
;
HRESULT
hr
;
hr
=
effect
->
lpVtbl
->
GetBool
(
effect
,
parameter
,
&
bvalue
);
if
(
!
res_desc
->
Elements
&&
res_desc
->
Rows
==
1
&&
res_desc
->
Columns
==
1
)
{
ok
(
hr
==
D3D_OK
,
"%u - %s: GetBool failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
hr
,
D3D_OK
);
ok
(
bvalue
==
get_bool
(
res_value
),
"%u - %s: GetBool bvalue failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
bvalue
,
get_bool
(
res_value
));
}
else
{
ok
(
hr
==
D3DERR_INVALIDCALL
,
"%u - %s: GetBool failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
hr
,
D3DERR_INVALIDCALL
);
ok
(
bvalue
==
0xabababab
,
"%u - %s: GetBool bvalue failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
bvalue
,
0xabababab
);
}
}
static
void
test_effect_parameter_value
(
IDirect3DDevice9
*
device
)
{
UINT
i
;
...
...
@@ -572,6 +602,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
"%u - %s: Warning: Array size to small
\n
"
,
i
,
res_full_name
);
test_effect_parameter_value_GetValue
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
test_effect_parameter_value_GetBool
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
}
count
=
effect
->
lpVtbl
->
Release
(
effect
);
...
...
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