mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Change-Id: If7e329fc12fe934eb0f6b1762d3b0d86aab287e6 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
43 lines
998 B
C++
43 lines
998 B
C++
/*
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/command_queue/command_queue.h"
|
|
#include "unit_tests/command_queue/command_queue_fixture.h"
|
|
#include "unit_tests/command_stream/command_stream_fixture.h"
|
|
#include "unit_tests/fixtures/device_fixture.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
using namespace NEO;
|
|
|
|
struct FlushTest
|
|
: public DeviceFixture,
|
|
public CommandQueueFixture,
|
|
public CommandStreamFixture,
|
|
public ::testing::Test {
|
|
|
|
using CommandQueueFixture::SetUp;
|
|
|
|
void SetUp() override {
|
|
DeviceFixture::SetUp();
|
|
CommandQueueFixture::SetUp(nullptr, pDevice, 0);
|
|
CommandStreamFixture::SetUp(pCmdQ);
|
|
}
|
|
|
|
void TearDown() override {
|
|
CommandStreamFixture::TearDown();
|
|
CommandQueueFixture::TearDown();
|
|
DeviceFixture::TearDown();
|
|
}
|
|
};
|
|
|
|
TEST_F(FlushTest, WhenFlushingThenSuccessIsReturned) {
|
|
auto retVal = pCmdQ->flush();
|
|
|
|
EXPECT_EQ(retVal, CL_SUCCESS);
|
|
}
|