From 2dbda4141859e3b541da263de70aa91852b43bae Mon Sep 17 00:00:00 2001 From: John Kesapides Date: Fri, 21 Oct 2022 10:07:38 +0100 Subject: [PATCH] Move results table into verify_if function. --- test_conformance/basic/test_if.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test_conformance/basic/test_if.cpp b/test_conformance/basic/test_if.cpp index 60772d9ee3..f2a8fa8299 100644 --- a/test_conformance/basic/test_if.cpp +++ b/test_conformance/basic/test_if.cpp @@ -53,15 +53,14 @@ __kernel void test_if(__global int *src, __global int *dst) } )"; -const int results[] = { - 0x12345678, 0x23456781, 0x34567812, 0x45678123, - 0x56781234, 0x67812345, 0x78123456, 0x81234567, -}; - - int verify_if(std::vector input, std::vector output) { - auto predicate = [](cl_int a, cl_int b) { + const cl_int results[] = { + 0x12345678, 0x23456781, 0x34567812, 0x45678123, + 0x56781234, 0x67812345, 0x78123456, 0x81234567, + }; + + auto predicate = [&results](cl_int a, cl_int b) { if (a <= 7) return b == results[a]; else