From 31fcb336a2d0d76a5b7dd7d988ffc2276c0f241b Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 23 May 2017 11:04:31 +0200 Subject: [PATCH] d3dx9/tests: Use ARRAY_SIZE in test_D3DXSHMultiply3(). 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 43413680443..3843abea9be 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -3274,7 +3274,7 @@ static void test_D3DXSHMultiply3(void) 1.17999995e+00f, 1.19000006e+00f, }; - for (i = 0; i < 20; i++) + for (i = 0; i < ARRAY_SIZE(a); ++i) { a[i] = 1.0f + i / 100.0f; b[i] = 3.0f - i / 100.0f; @@ -3282,7 +3282,7 @@ static void test_D3DXSHMultiply3(void) } D3DXSHMultiply3(c, a, b); - for (i = 0; i < 20; i++) + for (i = 0; i < ARRAY_SIZE(expected); ++i) { equal = compare_float(c[i], expected[i], 4); ok(equal, "Expected[%u] = %.8e, received = %.8e.\n", i, expected[i], c[i]); @@ -3290,7 +3290,7 @@ static void test_D3DXSHMultiply3(void) memcpy(c, a, sizeof(c)); D3DXSHMultiply3(c, c, b); - for (i = 0; i < 20; i++) + for (i = 0; i < ARRAY_SIZE(expected_aliased); ++i) { equal = compare_float(c[i], expected_aliased[i], 32); ok(equal, "Expected[%u] = %.8e, received = %.8e.\n", i, expected_aliased[i], c[i]);