1//===------- Offload API tests - olDestroyProgram -------------------------===//
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-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "../common/Fixtures.hpp"
10#include <OffloadAPI.h>
11#include <gtest/gtest.h>
12
13using olDestroyProgramTest = OffloadProgramTest;
14OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olDestroyProgramTest);
15
16TEST_P(olDestroyProgramTest, Success) {
17 ASSERT_SUCCESS(olDestroyProgram(Program));
18 Program = nullptr;
19}
20
21TEST_P(olDestroyProgramTest, InvalidNullHandle) {
22 ASSERT_ERROR(OL_ERRC_INVALID_NULL_HANDLE, olDestroyProgram(nullptr));
23}
24

source code of offload/unittests/OffloadAPI/program/olDestroyProgram.cpp