Files
compute-runtime/opencl/test/unit_test/api/cl_release_context_tests.inl
Fabian Zwolinski 2022592f3d Apply CamelCase for class and struct names 2/2
Additionally change .clang-tidy not to ignore struct names.

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-25 13:10:23 +02:00

37 lines
789 B
C++

/*
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "cl_api_tests.h"
using namespace NEO;
using ClReleaseContextTests = ApiTests;
namespace ULT {
TEST_F(ClReleaseContextTests, GivenValidContextWhenReleasingContextThenSuccessIsReturned) {
auto context = clCreateContext(
nullptr,
1u,
&testedClDevice,
nullptr,
nullptr,
&retVal);
EXPECT_NE(nullptr, context);
ASSERT_EQ(CL_SUCCESS, retVal);
retVal = clReleaseContext(context);
EXPECT_EQ(CL_SUCCESS, retVal);
}
TEST_F(ClReleaseContextTests, GivenNullContextWhenReleasingContextThenClInvalidContextIsReturned) {
auto retVal = clReleaseContext(nullptr);
EXPECT_EQ(CL_INVALID_CONTEXT, retVal);
}
} // namespace ULT