27 lines · cpp
1//===------- Offload API tests - olDestroyEvent ---------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "../common/Fixtures.hpp"10#include <OffloadAPI.h>11#include <gtest/gtest.h>12 13using olDestroyEventTest = OffloadQueueTest;14OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olDestroyEventTest);15 16TEST_P(olDestroyEventTest, Success) {17 ol_event_handle_t Event = nullptr;18 ASSERT_SUCCESS(olCreateEvent(Queue, &Event));19 ASSERT_NE(Event, nullptr);20 ASSERT_SUCCESS(olSyncQueue(Queue));21 ASSERT_SUCCESS(olDestroyEvent(Event));22}23 24TEST_P(olDestroyEventTest, InvalidNullEvent) {25 ASSERT_ERROR(OL_ERRC_INVALID_NULL_HANDLE, olDestroyEvent(nullptr));26}27