[PATCH 3/3] d3dx9_36: Add D3DXCreateAnimationController tests
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Wed Dec 23 00:47:18 CST 2015
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/d3dx9_36/tests/mesh.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 4186e19..fd764df 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -10959,6 +10959,57 @@ static void test_compute_normals(void)
free_test_context(test_context);
}
+static void D3DXCreateAnimationControllerTest(void)
+{
+ HRESULT hr;
+ ID3DXAnimationController *animation;
+ UINT value;
+
+ hr = D3DXCreateAnimationController(0, 0, 0, 0, NULL);
+ todo_wine ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
+
+if (0) /* Windows crashes when animation is Released */
+{
+ hr = D3DXCreateAnimationController(0, 0, 0, 0, &animation);
+ ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
+ animation->lpVtbl->Release(animation);
+}
+
+ hr = D3DXCreateAnimationController(1, 1, 1, 1, &animation);
+ ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
+
+ value = animation->lpVtbl->GetMaxNumAnimationOutputs(animation);
+ ok(value == 1, "Got unexpected value %u.\n", value);
+
+ value = animation->lpVtbl->GetMaxNumAnimationSets(animation);
+ ok(value == 1, "Got unexpected value %u.\n", value);
+
+ value = animation->lpVtbl->GetMaxNumTracks(animation);
+ ok(value == 1, "Got unexpected value %u.\n", value);
+
+ value = animation->lpVtbl->GetMaxNumEvents(animation);
+ ok(value == 1, "Got unexpected value %u.\n", value);
+
+ animation->lpVtbl->Release(animation);
+
+ hr = D3DXCreateAnimationController(100, 101, 102, 103, &animation);
+ ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
+
+ value = animation->lpVtbl->GetMaxNumAnimationOutputs(animation);
+ ok(value == 100, "Got unexpected value %u.\n", value);
+
+ value = animation->lpVtbl->GetMaxNumAnimationSets(animation);
+ ok(value == 101, "Got unexpected value %u.\n", value);
+
+ value = animation->lpVtbl->GetMaxNumTracks(animation);
+ ok(value == 102, "Got unexpected value %u.\n", value);
+
+ value = animation->lpVtbl->GetMaxNumEvents(animation);
+ ok(value == 103, "Got unexpected value %u.\n", value);
+
+ animation->lpVtbl->Release(animation);
+}
+
START_TEST(mesh)
{
D3DXBoundProbeTest();
@@ -10975,6 +11026,7 @@ START_TEST(mesh)
D3DXCreateCylinderTest();
D3DXCreateTextTest();
D3DXCreateTorusTest();
+ D3DXCreateAnimationControllerTest();
test_get_decl_length();
test_get_decl_vertex_size();
test_fvf_decl_conversion();
--
1.9.1
More information about the wine-patches
mailing list