mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
Reorganization directory structure [2/n]
Change-Id: I47962d17d755e80dcd9476e1ed75560f433f6115
This commit is contained in:
committed by
Jaroslaw Chodor
parent
d015d3633f
commit
e8852a68c4
28
opencl/test/unit_test/command_stream/tbx_stream_tests.cpp
Normal file
28
opencl/test/unit_test/command_stream/tbx_stream_tests.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "mocks/mock_tbx_sockets.h"
|
||||
#include "mocks/mock_tbx_stream.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
TEST(TbxStreamTests, givenTbxStreamWhenWriteMemoryIsCalledThenTypeIsZero) {
|
||||
std::unique_ptr<TbxCommandStreamReceiver::TbxStream> mockTbxStream(new MockTbxStream());
|
||||
MockTbxStream *mockTbxStreamPtr = static_cast<MockTbxStream *>(mockTbxStream.get());
|
||||
|
||||
MockTbxSockets *mockTbxSocket = new MockTbxSockets();
|
||||
mockTbxStreamPtr->socket = mockTbxSocket;
|
||||
|
||||
mockTbxStream->writeMemory(0, nullptr, 0, 0, 0);
|
||||
EXPECT_EQ(0u, mockTbxSocket->typeCapturedFromWriteMemory);
|
||||
|
||||
mockTbxStream->writePTE(0, 0, 0);
|
||||
EXPECT_EQ(0u, mockTbxSocket->typeCapturedFromWriteMemory);
|
||||
}
|
||||
Reference in New Issue
Block a user