SImple test cases for ID3DXMatrixStack interface
Jérôme Gardou (none)
jeje at jeje-desktop.
Sun Oct 26 18:17:29 CDT 2008
---
dlls/d3dx8/tests/math.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx8/tests/math.c b/dlls/d3dx8/tests/math.c
index 6a4b44d..0589603 100644
--- a/dlls/d3dx8/tests/math.c
+++ b/dlls/d3dx8/tests/math.c
@@ -1396,6 +1396,32 @@ static void D3X8Vector4Test(void)
expect_vec4(expectedtrans,gottrans);
}
+static void D3DXMatrixStackTest(void)
+{
+ LPD3DXMATRIXSTACK MatrixStack = NULL;
+ D3DMATRIX* matrix_ptr;
+ D3DMATRIX matrix ;
+ HRESULT hr;
+ ULONG ref ;
+ D3DXCreateMatrixStack(0 ,&MatrixStack) ;
+ ok(MatrixStack != NULL, "Could not create the ID3DXMatrixStack interface\n") ;
+
+ matrix_ptr = ID3DXMatrixStack_GetTop(MatrixStack) ;
+ ok(matrix_ptr == NULL, "Expected NULL, got %p for top matrix just after creation of the matrix stack\n", matrix_ptr) ;
+
+ hr = ID3DXMatrixStack_LoadIdentity(MatrixStack) ;
+ ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %08x for loading identity just after the creation of the matrix stack\n", hr) ;
+
+ D3DXMatrixIdentity(&matrix) ;
+ hr = ID3DXMatrixStack_LoadMatrix(MatrixStack, &matrix) ;
+ ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %08x for loading a matrix just after the creation of the matrix stack\n", hr) ;
+
+ /*Release everything*/
+ do {
+ ref = ID3DXMatrixStack_Release(MatrixStack) ;
+ } while ( ref != 0) ;
+}
+
START_TEST(math)
{
D3DXColorTest();
@@ -1405,4 +1431,5 @@ START_TEST(math)
D3X8Vector2Test();
D3X8Vector3Test();
D3X8Vector4Test();
+ D3DXMatrixStackTest() ;
}
--
1.5.4.3
--------------010704010907000107020905--
More information about the wine-devel
mailing list