| 4262 | } |
| 4263 | |
| 4264 | void testLinkProgramWithOptions(void) |
| 4265 | { |
| 4266 | #if CL_HPP_TARGET_OPENCL_VERSION >= 120 |
| 4267 | cl_int errcode; |
| 4268 | int refcount[] = {1,1}; |
| 4269 | |
| 4270 | // verify if class cl::Program was not modified |
| 4271 | TEST_ASSERT_EQUAL(sizeof(cl_program), sizeof(cl::Program)); |
| 4272 | |
| 4273 | clGetProgramInfo_StubWithCallback(clGetProgramInfo_testProgramGetContext); |
| 4274 | clLinkProgram_StubWithCallback(clLinkProgram_testLinkProgram); |
| 4275 | |
| 4276 | clRetainContext_ExpectAndReturn(make_context(0), CL_SUCCESS); |
| 4277 | clReleaseContext_ExpectAndReturn(make_context(0), CL_SUCCESS); |
| 4278 | prepare_programRefcounts(2, reinterpret_cast<cl_program *>(programPool), refcount); |
| 4279 | |
| 4280 | cl::Program prog = cl::linkProgram( |
| 4281 | cl::Program(make_program(0)), cl::Program(make_program(1)), |
| 4282 | "-cl-program-link-options", nullptr, nullptr, &errcode); |
| 4283 | |
| 4284 | TEST_ASSERT_EQUAL_PTR(prog(), make_program(0)); |
| 4285 | TEST_ASSERT_EQUAL(errcode, CL_SUCCESS); |
| 4286 | |
| 4287 | prog() = nullptr; |
| 4288 | #endif |
| 4289 | } |
| 4290 | |
| 4291 | void testLinkProgramWithStringOptions(void) |
| 4292 | { |
nothing calls this directly
no test coverage detected