Module: wine Branch: master Commit: 69f93748c1a212f08ea0565894e2c4ba33be0883 URL: http://source.winehq.org/git/wine.git/?a=commit;h=69f93748c1a212f08ea0565894...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu May 25 22:01:35 2017 +0200
d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHEvalDirectionalLight().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3dx9_36/tests/math.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index 3843abe..b709321 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -2898,7 +2898,7 @@ static void test_D3DXSHEvalDirectionalLight(void)
dir.x = 1.1f; dir.y= 1.2f; dir.z = 2.76f;
- for (l = 0; l < sizeof( test ) / sizeof( test[0] ); l++) + for (l = 0; l < ARRAY_SIZE(test); ++l) { startindex = 0;
@@ -2908,7 +2908,7 @@ static void test_D3DXSHEvalDirectionalLight(void) green_out = test[l].green_in; blue_out = test[l].blue_in;
- for (j = 0; j < 49; j++) + for (j = 0; j < ARRAY_SIZE(rout); ++j) { red_out[j] = 1.01f + j; if ( green_out ) @@ -2920,7 +2920,7 @@ static void test_D3DXSHEvalDirectionalLight(void) hr = D3DXSHEvalDirectionalLight(order, &dir, 1.7f, 2.6f, 3.5f, red_out, green_out, blue_out); ok(hr == D3D_OK, "Expected %#x, got %#x\n", D3D_OK, hr);
- for (j = 0; j < 49; j++) + for (j = 0; j < ARRAY_SIZE(rout); ++j) { if ( j >= order * order ) expected = j + test[l].roffset;