aboutsummaryrefslogtreecommitdiff
path: root/offload/unittests/OffloadAPI/program/olDestroyProgram.cpp
blob: d7fc73b2ec0d9c655facf92f011fa5578b50809a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//===------- Offload API tests - olDestroyProgram -------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "../common/Fixtures.hpp"
#include <OffloadAPI.h>
#include <gtest/gtest.h>

using olDestroyProgramTest = OffloadProgramTest;
OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olDestroyProgramTest);

TEST_P(olDestroyProgramTest, Success) {
  ASSERT_SUCCESS(olDestroyProgram(Program));
  Program = nullptr;
}

TEST_P(olDestroyProgramTest, InvalidNullHandle) {
  ASSERT_ERROR(OL_ERRC_INVALID_NULL_HANDLE, olDestroyProgram(nullptr));
}