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
9ea9a053
Commit
9ea9a053
authored
Mar 27, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Mar 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add ID3DXEffectCompiler test.
parent
f1bfecd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
effect.c
dlls/d3dx9_36/tests/effect.c
+55
-0
No files found.
dlls/d3dx9_36/tests/effect.c
View file @
9ea9a053
...
...
@@ -117,6 +117,60 @@ static void test_create_effect_and_pool(IDirect3DDevice9 *device)
ok
(
count
==
0
,
"Release failed %u
\n
"
,
count
);
}
static
void
test_create_effect_compiler
(
void
)
{
HRESULT
hr
;
ID3DXEffectCompiler
*
compiler
,
*
compiler2
;
ID3DXBaseEffect
*
base
;
IUnknown
*
unknown
;
ULONG
count
;
hr
=
D3DXCreateEffectCompiler
(
NULL
,
0
,
NULL
,
NULL
,
0
,
&
compiler
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3D_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateEffectCompiler
(
NULL
,
0
,
NULL
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3D_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateEffectCompiler
(
effect_desc
,
0
,
NULL
,
NULL
,
0
,
&
compiler
,
NULL
);
ok
(
hr
==
D3D_OK
,
"Got result %x, expected %x (D3D_OK)
\n
"
,
hr
,
D3D_OK
);
count
=
compiler
->
lpVtbl
->
Release
(
compiler
);
ok
(
count
==
0
,
"Release failed %u
\n
"
,
count
);
hr
=
D3DXCreateEffectCompiler
(
effect_desc
,
0
,
NULL
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3D_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateEffectCompiler
(
NULL
,
sizeof
(
effect_desc
),
NULL
,
NULL
,
0
,
&
compiler
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3D_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateEffectCompiler
(
NULL
,
sizeof
(
effect_desc
),
NULL
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3D_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateEffectCompiler
(
effect_desc
,
sizeof
(
effect_desc
),
NULL
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateEffectCompiler
(
effect_desc
,
sizeof
(
effect_desc
),
NULL
,
NULL
,
0
,
&
compiler
,
NULL
);
ok
(
hr
==
D3D_OK
,
"Got result %x, expected %x (D3D_OK)
\n
"
,
hr
,
D3D_OK
);
hr
=
compiler
->
lpVtbl
->
QueryInterface
(
compiler
,
&
IID_ID3DXBaseEffect
,
(
void
**
)
&
base
);
ok
(
hr
==
E_NOINTERFACE
,
"QueryInterface failed, got %x, expected %x (E_NOINTERFACE)
\n
"
,
hr
,
E_NOINTERFACE
);
hr
=
compiler
->
lpVtbl
->
QueryInterface
(
compiler
,
&
IID_ID3DXEffectCompiler
,
(
void
**
)
&
compiler2
);
ok
(
hr
==
D3D_OK
,
"QueryInterface failed, got %x, expected %x (D3D_OK)
\n
"
,
hr
,
D3D_OK
);
hr
=
compiler
->
lpVtbl
->
QueryInterface
(
compiler
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok
(
hr
==
D3D_OK
,
"QueryInterface failed, got %x, expected %x (D3D_OK)
\n
"
,
hr
,
D3D_OK
);
count
=
unknown
->
lpVtbl
->
Release
(
unknown
);
ok
(
count
==
2
,
"Release failed, got %u, expected %u
\n
"
,
count
,
2
);
count
=
compiler2
->
lpVtbl
->
Release
(
compiler2
);
ok
(
count
==
1
,
"Release failed, got %u, expected %u
\n
"
,
count
,
1
);
count
=
compiler
->
lpVtbl
->
Release
(
compiler
);
ok
(
count
==
0
,
"Release failed %u
\n
"
,
count
);
}
START_TEST
(
effect
)
{
HWND
wnd
;
...
...
@@ -150,6 +204,7 @@ START_TEST(effect)
}
test_create_effect_and_pool
(
device
);
test_create_effect_compiler
();
count
=
IDirect3DDevice9_Release
(
device
);
ok
(
count
==
0
,
"The device was not properly freed: refcount %u
\n
"
,
count
);
...
...
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