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

Function testSetDefaultCommandQueue

tests/test_openclhpp.cpp:3281–3295  ·  view source on GitHub ↗

Note that default tests maintain state when run from the same unit process. One default setting test will maintain the defaults until the end.

Source from the content-addressed store, hash-verified

3279// unit process.
3280// One default setting test will maintain the defaults until the end.
3281void testSetDefaultCommandQueue(void)
3282{
3283 clRetainCommandQueue_ExpectAndReturn(make_command_queue(1), CL_SUCCESS);
3284 clRetainCommandQueue_ExpectAndReturn(make_command_queue(1), CL_SUCCESS);
3285 clRetainCommandQueue_ExpectAndReturn(make_command_queue(1), CL_SUCCESS);
3286 clReleaseCommandQueue_ExpectAndReturn(make_command_queue(1), CL_SUCCESS);
3287 clReleaseCommandQueue_ExpectAndReturn(make_command_queue(1), CL_SUCCESS);
3288 clReleaseCommandQueue_ExpectAndReturn(make_command_queue(1), CL_SUCCESS);
3289
3290 cl::CommandQueue c(make_command_queue(1));
3291 cl::CommandQueue c2 = cl::CommandQueue::setDefault(c);
3292 cl::CommandQueue c3 = cl::CommandQueue::getDefault();
3293 TEST_ASSERT_EQUAL(c(), c2());
3294 TEST_ASSERT_EQUAL(c(), c3());
3295}
3296
3297// Note that default tests maintain state when run from the same
3298// unit process.

Callers

nothing calls this directly

Calls 1

make_command_queueFunction · 0.85

Tested by

no test coverage detected