mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00

Dates corrected in copyright headers to reflect original publication date (2018 for OpenCL, 2020 for Level Zero). Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
34 lines
926 B
C++
34 lines
926 B
C++
/*
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "opencl/source/command_queue/command_queue.h"
|
|
|
|
#include "cl_api_tests.h"
|
|
|
|
using namespace NEO;
|
|
|
|
typedef api_tests clEnqueueBarrierTests;
|
|
|
|
TEST_F(clEnqueueBarrierTests, GivenNullCommandQueueWhenEnqueuingThenInvalidCommandQueueErrorIsReturned) {
|
|
auto retVal = clEnqueueBarrier(
|
|
nullptr);
|
|
EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal);
|
|
}
|
|
|
|
TEST_F(clEnqueueBarrierTests, GivenValidCommandQueueWhenEnqueuingBarrierThenSuccessIsReturned) {
|
|
auto retVal = clEnqueueBarrier(
|
|
pCommandQueue);
|
|
EXPECT_EQ(CL_SUCCESS, retVal);
|
|
}
|
|
|
|
TEST_F(clEnqueueBarrierTests, GivenQueueIncapableWhenEnqueuingBarrierThenInvalidOperationIsReturned) {
|
|
this->disableQueueCapabilities(CL_QUEUE_CAPABILITY_BARRIER_INTEL);
|
|
auto retVal = clEnqueueBarrier(
|
|
pCommandQueue);
|
|
EXPECT_EQ(CL_INVALID_OPERATION, retVal);
|
|
}
|