| 4289 | } |
| 4290 | |
| 4291 | void testLinkProgramWithStringOptions(void) |
| 4292 | { |
| 4293 | #if CL_HPP_TARGET_OPENCL_VERSION >= 120 |
| 4294 | cl_int errcode; |
| 4295 | int refcount[] = {1,1}; |
| 4296 | |
| 4297 | // verify if class cl::Program was not modified |
| 4298 | TEST_ASSERT_EQUAL(sizeof(cl_program), sizeof(cl::Program)); |
| 4299 | |
| 4300 | clGetProgramInfo_StubWithCallback(clGetProgramInfo_testProgramGetContext); |
| 4301 | clLinkProgram_StubWithCallback(clLinkProgram_testLinkProgram); |
| 4302 | |
| 4303 | clRetainContext_ExpectAndReturn(make_context(0), CL_SUCCESS); |
| 4304 | clReleaseContext_ExpectAndReturn(make_context(0), CL_SUCCESS); |
| 4305 | prepare_programRefcounts(2, reinterpret_cast<cl_program *>(programPool), refcount); |
| 4306 | |
| 4307 | cl::string options("-cl-program-link-options"); |
| 4308 | cl::Program prog = cl::linkProgram( |
| 4309 | cl::Program(make_program(0)), cl::Program(make_program(1)), |
| 4310 | options, nullptr, nullptr, &errcode); |
| 4311 | |
| 4312 | TEST_ASSERT_EQUAL_PTR(prog(), make_program(0)); |
| 4313 | TEST_ASSERT_EQUAL(errcode, CL_SUCCESS); |
| 4314 | |
| 4315 | prog() = nullptr; |
| 4316 | #endif |
| 4317 | } |
| 4318 | |
| 4319 | void testLinkProgramWithVectorProgramInput(void) |
| 4320 | { |
nothing calls this directly
no test coverage detected