Module: wine Branch: master Commit: b2e3e2e9439ca0e7c106209a59e41d5beed54445 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b2e3e2e9439ca0e7c106209a59...
Author: Francois Gouget fgouget@free.fr Date: Sat Jun 23 17:11:25 2012 +0200
d3dx9_36/tests: Simplify test_D3DXSHMultiply3().
---
dlls/d3dx9_36/tests/math.c | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index c2a652c..70290bf 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -2403,10 +2403,11 @@ static void test_D3DXSHMultiply3(void) { unsigned int i; FLOAT a[20], b[20], c[20]; - const FLOAT expected[] = - { 7.813913f, 2.256058f, 5.9484005f, 4.970894f, 2.899858f, 3.598946f, 1.726572f, 5.573538f, - 0.622063f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, }; - + /* D3DXSHMultiply only modifies the first 9 elements of the array */ + const FLOAT expected[20] = + { 7.813913f, 2.256058f, 5.9484005f, 4.970894f, 2.899858f, 3.598946f, + 1.726572f, 5.573538f, 0.622063f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, + 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f };
for (i = 0; i < 20; i++) { @@ -2416,14 +2417,8 @@ static void test_D3DXSHMultiply3(void) }
D3DXSHMultiply3(c, a, b); - for (i = 0; i < 9; i++) - ok(relative_error(c[i], expected[i]) < admitted_error, "Expected[%d] = %f, received = %f\n", i, expected[i], c[i]); - -/* D3DXSHMultiply does not modify the elements of the array after the nineth element */ - for (i = 8; i < 19; i++) + for (i = 0; i < 20; i++) ok(relative_error(c[i], expected[i]) < admitted_error, "Expected[%d] = %f, received = %f\n", i, expected[i], c[i]); - - return; }
START_TEST(math)