| 2606 | } |
| 2607 | |
| 2608 | void testBuildProgramSingleDevice(void) |
| 2609 | { |
| 2610 | cl_program program = make_program(0); |
| 2611 | cl_device_id device_id = make_device_id(0); |
| 2612 | |
| 2613 | // Creating a device queries the platform version: |
| 2614 | clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform); |
| 2615 | clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_2); |
| 2616 | |
| 2617 | clBuildProgram_StubWithCallback(clBuildProgram_testBuildProgram); |
| 2618 | |
| 2619 | // Building the program queries the program build log: |
| 2620 | clRetainDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS); |
| 2621 | clGetProgramBuildInfo_StubWithCallback(clGetProgramBuildInfo_testGetBuildInfo); |
| 2622 | clGetProgramBuildInfo_StubWithCallback(clGetProgramBuildInfo_testGetBuildInfo); |
| 2623 | clReleaseDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS); |
| 2624 | clReleaseDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS); |
| 2625 | |
| 2626 | clReleaseProgram_ExpectAndReturn(program, CL_SUCCESS); |
| 2627 | |
| 2628 | cl::Program prog(program); |
| 2629 | cl::Device dev(device_id); |
| 2630 | |
| 2631 | cl_int errcode = prog.build(dev); |
| 2632 | |
| 2633 | TEST_ASSERT_EQUAL(errcode, CL_SUCCESS); |
| 2634 | } |
| 2635 | |
| 2636 | void testBuildProgramSingleDeviceWithOptions(void) |
| 2637 | { |
nothing calls this directly
no test coverage detected