brintos

brintos / llvm-project-archived public Read only

0
0
Text · 991 B · 957e9d5 Raw
30 lines · cpp
1//===------- Offload API tests - olCreateEvent ----------------------------===//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 olCreateEventTest = OffloadQueueTest;14OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olCreateEventTest);15 16TEST_P(olCreateEventTest, Success) {17  ol_event_handle_t Event = nullptr;18  ASSERT_SUCCESS(olCreateEvent(Queue, &Event));19  ASSERT_NE(Event, nullptr);20}21 22TEST_P(olCreateEventTest, InvalidNullQueue) {23  ol_event_handle_t Event;24  ASSERT_ERROR(OL_ERRC_INVALID_NULL_HANDLE, olCreateEvent(nullptr, &Event));25}26 27TEST_P(olCreateEventTest, InvalidNullDest) {28  ASSERT_ERROR(OL_ERRC_INVALID_NULL_POINTER, olCreateEvent(Queue, nullptr));29}30