| 2744 | } |
| 2745 | |
| 2746 | void testCompileProgramBasic(void) |
| 2747 | { |
| 2748 | #if CL_HPP_TARGET_OPENCL_VERSION >= 120 |
| 2749 | cl_program program = make_program(0); |
| 2750 | |
| 2751 | clCompileProgram_StubWithCallback(clCompileProgram_basic); |
| 2752 | |
| 2753 | // Compiling the program queries the program build log: |
| 2754 | clGetProgramInfo_StubWithCallback(clGetProgramInfo_forBuildLog); |
| 2755 | clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform); |
| 2756 | clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_2); |
| 2757 | clRetainDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS); |
| 2758 | clRetainDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS); |
| 2759 | clGetProgramBuildInfo_StubWithCallback(clGetProgramBuildInfo_testGetBuildInfo); |
| 2760 | clReleaseDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS); |
| 2761 | clReleaseDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS); |
| 2762 | |
| 2763 | clReleaseProgram_ExpectAndReturn(program, CL_SUCCESS); |
| 2764 | |
| 2765 | cl::Program prog(program); |
| 2766 | cl_int errcode = prog.compile(); |
| 2767 | |
| 2768 | TEST_ASSERT_EQUAL(errcode, CL_SUCCESS); |
| 2769 | #endif |
| 2770 | } |
| 2771 | |
| 2772 | void testCompileProgramWithOptions(void) |
| 2773 | { |
nothing calls this directly
no test coverage detected