MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CLHPP / testCompileProgramBasic

Function testCompileProgramBasic

tests/test_openclhpp.cpp:2746–2770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2744}
2745
2746void 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
2772void testCompileProgramWithOptions(void)
2773{

Callers

nothing calls this directly

Calls 3

make_programFunction · 0.85
make_device_idFunction · 0.85
compileMethod · 0.80

Tested by

no test coverage detected