diff --git a/test_conformance/extensions/cl_khr_command_buffer/negative_command_nd_range_kernel.cpp b/test_conformance/extensions/cl_khr_command_buffer/negative_command_nd_range_kernel.cpp index 32b67a8719..bcb8669c0e 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/negative_command_nd_range_kernel.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/negative_command_nd_range_kernel.cpp @@ -105,7 +105,19 @@ struct CommandNDRangeKerneSyncPointsNullOrNumZero cl_int Run() override { + cl_sync_point_khr invalid_point = 0; + cl_sync_point_khr* invalid_sync_points[] = { &invalid_point }; cl_int error = clCommandNDRangeKernelKHR( + command_buffer, nullptr, nullptr, kernel, 0, nullptr, &num_elements, + nullptr, 1, invalid_sync_points[0], nullptr, nullptr); + + test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, + "clCommandNDRangeKernelKHR should return " + "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", + TEST_FAIL); + + + error = clCommandNDRangeKernelKHR( command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements, nullptr, 1, nullptr, nullptr, nullptr); @@ -130,16 +142,6 @@ struct CommandNDRangeKerneSyncPointsNullOrNumZero "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", TEST_FAIL); - cl_sync_point_khr invalid_point = 0; - cl_sync_point_khr* invalid_sync_points[] = { &invalid_point }; - error = clCommandNDRangeKernelKHR( - command_buffer, nullptr, nullptr, kernel, 0, nullptr, &num_elements, - nullptr, 1, invalid_sync_points[0], nullptr, nullptr); - - test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR, - "clCommandNDRangeKernelKHR should return " - "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR", - TEST_FAIL); return CL_SUCCESS; }