David Adam : d3dx9_36: Add a test for D3DXCreateBox.
Alexandre Julliard
julliard at winehq.org
Fri Mar 4 09:39:36 CST 2011
Module: wine
Branch: master
Commit: 23faba7eb1119dca25e643a40539f4940ee0d40c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=23faba7eb1119dca25e643a40539f4940ee0d40c
Author: David Adam <david.adam.cnrs at gmail.com>
Date: Fri Mar 4 08:29:20 2011 +0100
d3dx9_36: Add a test for D3DXCreateBox.
---
dlls/d3dx9_36/tests/mesh.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 05d68eb..a6ac4b3 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -1357,6 +1357,15 @@ static void D3DXCreateBoxTest(void)
D3DPRESENT_PARAMETERS d3dpp;
ID3DXMesh* box;
ID3DXBuffer* ppBuffer;
+ DWORD *buffer;
+ static const DWORD adjacency[36]=
+ {6, 9, 1, 2, 10, 0,
+ 1, 9, 3, 4, 10, 2,
+ 3, 8, 5, 7, 11, 4,
+ 0, 11, 7, 5, 8, 6,
+ 7, 4, 9, 2, 0, 8,
+ 1, 3, 11, 5, 6, 10};
+ unsigned int i;
wc.lpfnWndProc = DefWindowProcA;
wc.lpszClassName = "d3dx9_test_wc";
@@ -1414,6 +1423,21 @@ static void D3DXCreateBoxTest(void)
hr = D3DXCreateBox(device,22.0f,20.0f,-4.9f,&box, &ppBuffer);
todo_wine ok(hr==D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x", hr);
+ hr = D3DXCreateBox(device,10.9f,20.0f,4.9f,&box, &ppBuffer);
+ todo_wine ok(hr==D3D_OK,"Expected D3D_OK, received %#x", hr);
+
+ if (FAILED(hr))
+ {
+ skip("D3DXCreateBox failed\n");
+ goto end;
+ }
+
+ buffer = ID3DXBuffer_GetBufferPointer(ppBuffer);
+ for(i=0; i<36; i++)
+ todo_wine ok(adjacency[i]==buffer[i], "expected adjacency %d: %#x, received %#x\n",i,adjacency[i], buffer[i]);
+
+ box->lpVtbl->Release(box);
+
end:
IDirect3DDevice9_Release(device);
IDirect3D9_Release(d3d);
More information about the wine-cvs
mailing list