brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1019 B · 8a2b964 Raw
30 lines · cpp
1//===------- Offload API tests - olCreateQueue ----------------------------===//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 olCreateQueueTest = OffloadDeviceTest;14OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olCreateQueueTest);15 16TEST_P(olCreateQueueTest, Success) {17  ol_queue_handle_t Queue = nullptr;18  ASSERT_SUCCESS(olCreateQueue(Device, &Queue));19  ASSERT_NE(Queue, nullptr);20}21 22TEST_P(olCreateQueueTest, InvalidNullHandleDevice) {23  ol_queue_handle_t Queue = nullptr;24  ASSERT_ERROR(OL_ERRC_INVALID_NULL_HANDLE, olCreateQueue(nullptr, &Queue));25}26 27TEST_P(olCreateQueueTest, InvalidNullPointerQueue) {28  ASSERT_ERROR(OL_ERRC_INVALID_NULL_POINTER, olCreateQueue(Device, nullptr));29}30