Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8eae13fd
Commit
8eae13fd
authored
Jan 22, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Jan 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm/tests: Add more tests.
parent
dc700123
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
11 deletions
+43
-11
d3drm.c
dlls/d3drm/tests/d3drm.c
+43
-11
No files found.
dlls/d3drm/tests/d3drm.c
View file @
8eae13fd
...
...
@@ -180,31 +180,32 @@ static void test_MeshBuilder3(void)
if
(
FAILED
(
hr
))
{
win_skip
(
"Cannot get IDirect3DRM3 interface (hr = %x), skipping tests
\n
"
,
hr
);
IDirect3DRM_Release
(
pD3DRM
);
return
;
}
hr
=
IDirect3DRM_CreateMeshBuilder
(
pD3DRM3
,
&
pMeshBuilder3
);
hr
=
IDirect3DRM
3
_CreateMeshBuilder
(
pD3DRM3
,
&
pMeshBuilder3
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRMMeshBuilder3 interface (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_bad_version
;
info
.
dSize
=
strlen
(
data_bad_version
);
hr
=
IDirect3DRMMeshBuilder_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
hr
=
IDirect3DRMMeshBuilder
3
_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
ok
(
hr
==
D3DRMERR_BADFILE
,
"Should have returned D3DRMERR_BADFILE (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_no_mesh
;
info
.
dSize
=
strlen
(
data_no_mesh
);
hr
=
IDirect3DRMMeshBuilder_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
hr
=
IDirect3DRMMeshBuilder
3
_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
ok
(
hr
==
D3DRMERR_NOTFOUND
,
"Should have returned D3DRMERR_NOTFOUND (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_ok
;
info
.
dSize
=
strlen
(
data_ok
);
hr
=
IDirect3DRMMeshBuilder_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
hr
=
IDirect3DRMMeshBuilder
3
_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
ok
(
hr
==
D3DRM_OK
,
"Cannot load mesh data (hr = %x)
\n
"
,
hr
);
val
=
IDirect3DRMMeshBuilder_GetVertexCount
(
pMeshBuilder3
);
val
=
IDirect3DRMMeshBuilder
3
_GetVertexCount
(
pMeshBuilder3
);
ok
(
val
==
4
,
"Wrong number of vertices %d (must be 4)
\n
"
,
val
);
val
=
IDirect3DRMMeshBuilder_GetFaceCount
(
pMeshBuilder3
);
val
=
IDirect3DRMMeshBuilder
3
_GetFaceCount
(
pMeshBuilder3
);
ok
(
val
==
3
,
"Wrong number of faces %d (must be 3)
\n
"
,
val
);
hr
=
IDirect3DRMMeshBuilder3_GetVertices
(
pMeshBuilder3
,
0
,
&
val1
,
NULL
);
...
...
@@ -230,9 +231,9 @@ static void test_MeshBuilder3(void)
todo_wine
ok
(
valu
==
1
.
23
f
,
"Wrong coordinate %f (must be 1.23)
\n
"
,
valu
);
todo_wine
ok
(
valv
==
3
.
21
f
,
"Wrong coordinate %f (must be 3.21)
\n
"
,
valv
);
IDirect3DRMMeshBuilder_Release
(
pMeshBuilder3
);
IDirect3DRM_Release
(
pD3DRM
3
);
IDirect3DRMMeshBuilder
3
_Release
(
pMeshBuilder3
);
IDirect3DRM3_Release
(
pD3DRM3
);
IDirect3DRM_Release
(
pD3DRM
);
}
static
void
test_Frame
(
void
)
...
...
@@ -270,10 +271,19 @@ static void test_Frame(void)
IDirect3DRMFrameArray_Release
(
pArray
);
}
/* Add child to first parent */
hr
=
IDirect3DRM_CreateFrame
(
pD3DRM
,
NULL
,
&
pFrameP1
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRMFrame interface (hr = %x)
\n
"
,
hr
);
/* [Add/Delete]Child with NULL pointer */
hr
=
IDirect3DRMFrame_AddChild
(
pFrameP1
,
NULL
);
todo_wine
ok
(
hr
==
D3DRMERR_BADOBJECT
,
"Should have returned D3DRMERR_BADOBJECT (hr = %x)
\n
"
,
hr
);
CHECK_REFCOUNT
(
pFrameP1
,
1
);
hr
=
IDirect3DRMFrame_DeleteChild
(
pFrameP1
,
NULL
);
todo_wine
ok
(
hr
==
D3DRMERR_BADOBJECT
,
"Should have returned D3DRMERR_BADOBJECT (hr = %x)
\n
"
,
hr
);
CHECK_REFCOUNT
(
pFrameP1
,
1
);
/* Add child to first parent */
pFrameTmp
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DRMFrame_GetParent
(
pFrameP1
,
&
pFrameTmp
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get parent frame (hr = %x)
\n
"
,
hr
);
...
...
@@ -370,9 +380,31 @@ static void test_Frame(void)
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get parent frame (hr = %x)
\n
"
,
hr
);
todo_wine
ok
(
pFrameTmp
==
NULL
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
/* Add two children */
hr
=
IDirect3DRMFrame_AddChild
(
pFrameP2
,
pFrameC
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot add child frame (hr = %x)
\n
"
,
hr
);
todo_wine
CHECK_REFCOUNT
(
pFrameC
,
2
);
hr
=
IDirect3DRMFrame_AddChild
(
pFrameP2
,
pFrameP1
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot add child frame (hr = %x)
\n
"
,
hr
);
todo_wine
CHECK_REFCOUNT
(
pFrameP1
,
3
);
pArray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
pArray
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get children (hr = %x)
\n
"
,
hr
);
if
(
pArray
)
{
count
=
IDirect3DRMFrameArray_GetSize
(
pArray
);
ok
(
count
==
2
,
"count = %u
\n
"
,
count
);
IDirect3DRMFrameArray_Release
(
pArray
);
}
IDirect3DRMMeshBuilder_Release
(
pFrameP2
);
todo_wine
CHECK_REFCOUNT
(
pFrameC
,
2
);
todo_wine
CHECK_REFCOUNT
(
pFrameP1
,
3
);
IDirect3DRMMeshBuilder_Release
(
pFrameC
);
IDirect3DRMMeshBuilder_Release
(
pFrameP1
);
IDirect3DRMMeshBuilder_Release
(
pFrameP2
);
IDirect3DRM_Release
(
pD3DRM
);
}
...
...
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