mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 09:30:36 +08:00
Change-Id: If43cf9d1353b4cbc02ea269fb9105c01cc4e0876 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
30 lines
1.1 KiB
C++
30 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2017-2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "unit_tests/fixtures/memory_manager_fixture.h"
|
|
#include "unit_tests/mocks/mock_csr.h"
|
|
#include "unit_tests/mocks/mock_memory_manager.h"
|
|
|
|
using namespace OCLRT;
|
|
using ::testing::NiceMock;
|
|
|
|
void MemoryManagerWithCsrFixture::SetUp() {
|
|
csr = new MockCommandStreamReceiver(this->executionEnvironment);
|
|
gmockMemoryManager = new NiceMock<GMockMemoryManager>(executionEnvironment);
|
|
memoryManager = gmockMemoryManager;
|
|
|
|
ON_CALL(*gmockMemoryManager, cleanAllocationList(::testing::_, ::testing::_)).WillByDefault(::testing::Invoke(gmockMemoryManager, &GMockMemoryManager::MemoryManagerCleanAllocationList));
|
|
ON_CALL(*gmockMemoryManager, populateOsHandles(::testing::_)).WillByDefault(::testing::Invoke(gmockMemoryManager, &GMockMemoryManager::MemoryManagerPopulateOsHandles));
|
|
|
|
csr->tagAddress = ¤tGpuTag;
|
|
executionEnvironment.commandStreamReceivers.push_back(std::unique_ptr<CommandStreamReceiver>(csr));
|
|
}
|
|
|
|
void MemoryManagerWithCsrFixture::TearDown() {
|
|
delete memoryManager;
|
|
}
|