diff --git a/tests/test_openclhpp.cpp b/tests/test_openclhpp.cpp index c564a469..4bd220c7 100644 --- a/tests/test_openclhpp.cpp +++ b/tests/test_openclhpp.cpp @@ -4571,6 +4571,40 @@ void testgetObjectInfo() { TEST_ASSERT_EQUAL(type, CL_GL_OBJECT_BUFFER); TEST_ASSERT_EQUAL(bufobj, 0); } + +#if CL_HPP_TARGET_OPENCL_VERSION >= 120 +static cl_int clEnqueueMarkerWithWaitList_testenqueueMarkerWithWaitList( + cl_command_queue command_queue, cl_uint num_events_in_wait_list, + const cl_event *event_wait_list, cl_event *event, int num_calls) { + TEST_ASSERT_EQUAL_PTR(make_command_queue(0), command_queue); + TEST_ASSERT_EQUAL(1, num_events_in_wait_list); + TEST_ASSERT_NOT_NULL(event_wait_list); + TEST_ASSERT_EQUAL_PTR(event_wait_list[0], make_event(0)); + TEST_ASSERT_EQUAL(0, num_calls); + if (event != nullptr) { + *event = make_event(1); + } + return CL_SUCCESS; +} + +void testenqueueMarkerWithWaitList() { + cl_int ret = CL_DEVICE_NOT_FOUND; + cl::Event event; + cl::vector events; + events.emplace_back(cl::Event(make_event(0))); + + clEnqueueMarkerWithWaitList_StubWithCallback( + clEnqueueMarkerWithWaitList_testenqueueMarkerWithWaitList); + ret = commandQueuePool[0].enqueueMarkerWithWaitList(&events, &event); + TEST_ASSERT_EQUAL(CL_SUCCESS, ret); + TEST_ASSERT_EQUAL_PTR(make_event(1), event()); + + event() = nullptr; + events[0]() = nullptr; +} +#else +void testenqueueMarkerWithWaitList() {} +#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 #if CL_HPP_TARGET_OPENCL_VERSION >= 210 static cl_int clGetHostTimer_testgetHostTimer(cl_device_id device, cl_ulong *host_timestamp,