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

Function testCommandQueueGetContext

tests/test_openclhpp.cpp:865–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865void testCommandQueueGetContext(void)
866{
867 cl_context expected = make_context(0);
868 int refcount = 1;
869
870 clGetCommandQueueInfo_StubWithCallback(clGetCommandQueueInfo_testCommandQueueGetContext);
871 prepare_contextRefcounts(1, &expected, &refcount);
872
873 cl::Context ctx = commandQueuePool[0].getInfo<CL_QUEUE_CONTEXT>();
874 TEST_ASSERT_EQUAL_PTR(expected, ctx());
875 TEST_ASSERT_EQUAL(2, refcount);
876
877 ctx() = nullptr;
878}
879
880// Stub for clGetCommandQueueInfo that returns device 0
881static cl_int clGetCommandQueueInfo_testCommandQueueGetDevice(

Callers

nothing calls this directly

Calls 1

make_contextFunction · 0.85

Tested by

no test coverage detected