| 4236 | } |
| 4237 | |
| 4238 | void testLinkProgram(void) |
| 4239 | { |
| 4240 | #if CL_HPP_TARGET_OPENCL_VERSION >= 120 |
| 4241 | cl_int errcode; |
| 4242 | int refcount[] = {1,1}; |
| 4243 | |
| 4244 | // verify if class cl::Program was not modified |
| 4245 | TEST_ASSERT_EQUAL(sizeof(cl_program), sizeof(cl::Program)); |
| 4246 | |
| 4247 | clGetProgramInfo_StubWithCallback(clGetProgramInfo_testProgramGetContext); |
| 4248 | clLinkProgram_StubWithCallback(clLinkProgram_testLinkProgram); |
| 4249 | |
| 4250 | clRetainContext_ExpectAndReturn(make_context(0), CL_SUCCESS); |
| 4251 | clReleaseContext_ExpectAndReturn(make_context(0), CL_SUCCESS); |
| 4252 | prepare_programRefcounts(2, reinterpret_cast<cl_program *>(programPool), refcount); |
| 4253 | |
| 4254 | cl::Program prog = cl::linkProgram(cl::Program(make_program(0)), cl::Program(make_program(1)), |
| 4255 | nullptr, nullptr, nullptr, &errcode); |
| 4256 | |
| 4257 | TEST_ASSERT_EQUAL_PTR(prog(), make_program(0)); |
| 4258 | TEST_ASSERT_EQUAL(errcode, CL_SUCCESS); |
| 4259 | |
| 4260 | prog() = nullptr; |
| 4261 | #endif |
| 4262 | } |
| 4263 | |
| 4264 | void testLinkProgramWithOptions(void) |
| 4265 | { |
nothing calls this directly
no test coverage detected