From 69f93748c1a212f08ea0565894e2c4ba33be0883 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 25 May 2017 22:01:35 +0200 Subject: [PATCH] d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHEvalDirectionalLight(). Signed-off-by: Henri Verbeet Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- 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 3843abea9be..b709321c2ad 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;