From b09d195bf3c1bd4fef208411ffdbd31b4f1031c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rico=20Sch=C3=BCller?= Date: Wed, 18 Apr 2012 09:33:45 +0200 Subject: [PATCH] d3dx9/tests: Add tests for ID3DXBaseEffect::G/SetValue(). --- dlls/d3dx9_36/tests/effect.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index fda0319e678..eb52f7e8ae6 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -1695,6 +1695,8 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) * effect->lpVtbl->SetMatrixArray(effect, parameter, NULL, res_desc->Elements ? res_desc->Elements : 1); * effect->lpVtbl->SetMatrixTranspose(effect, parameter, NULL); * effect->lpVtbl->SetMatrixTransposeArray(effect, parameter, NULL, res_desc->Elements ? res_desc->Elements : 1); + * effect->lpVtbl->GetValue(effect, parameter, NULL, res_desc->Bytes); + * effect->lpVtbl->SetValue(effect, parameter, NULL, res_desc->Bytes); */ hr = effect->lpVtbl->SetBool(effect, NULL, bvalue); ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetBool failed, got %#x, expected %#x\n", @@ -1836,6 +1838,22 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetMatrixTransposeArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3DERR_INVALIDCALL); + hr = effect->lpVtbl->SetValue(effect, NULL, input_value, res_desc->Bytes); + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetValue failed, got %#x, expected %#x\n", + i, res_full_name, hr, D3DERR_INVALIDCALL); + + hr = effect->lpVtbl->SetValue(effect, parameter, input_value, res_desc->Bytes - 1); + ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetValue failed, got %#x, expected %#x\n", + i, res_full_name, hr, D3DERR_INVALIDCALL); + + hr = effect->lpVtbl->GetValue(effect, NULL, input_value, res_desc->Bytes); + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetValue failed, got %#x, expected %#x\n", + i, res_full_name, hr, D3DERR_INVALIDCALL); + + hr = effect->lpVtbl->GetValue(effect, parameter, input_value, res_desc->Bytes - 1); + ok(hr == D3DERR_INVALIDCALL, "%u - %s: GetValue failed, got %#x, expected %#x\n", + i, res_full_name, hr, D3DERR_INVALIDCALL); + test_effect_parameter_value_GetTestGroup(&res[k], effect, &blob[res_value_offset], parameter, i); /* SetBool */