2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2021-05-16 20:51:16 +02:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-22 22:50:57 +01:00
|
|
|
#include "opencl/source/command_queue/command_queue.h"
|
|
|
|
|
2019-02-27 11:39:32 +01:00
|
|
|
#include "cl_api_tests.h"
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
using namespace NEO;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
typedef api_tests clFlushTests;
|
|
|
|
|
|
|
|
namespace ULT {
|
|
|
|
|
2019-02-26 20:54:31 +01:00
|
|
|
TEST_F(clFlushTests, GivenValidCommandQueueWhenFlushingThenSuccessIsReturned) {
|
2017-12-21 00:45:38 +01:00
|
|
|
retVal = clFlush(pCommandQueue);
|
|
|
|
EXPECT_EQ(CL_SUCCESS, retVal);
|
|
|
|
}
|
|
|
|
|
2019-02-26 20:54:31 +01:00
|
|
|
TEST_F(clFlushTests, GivenNullCommandQueueWhenFlushingThenInvalidCommandQueueErrorIsReturned) {
|
2017-12-21 00:45:38 +01:00
|
|
|
auto retVal = clFlush(nullptr);
|
|
|
|
EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal);
|
|
|
|
}
|
|
|
|
} // namespace ULT
|