Don't store MockProgram as member of fixture

This is to prepare for adding argument to MockProgram constructor. It'll have
to be constructed after ExecutionEnvironment creation, for example after
DeviceFixture::SetUp.

Change-Id: I37b08f814679271820a07fb29cf1fb6b517c8376
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-08-09 11:34:50 +02:00
committed by sys_ocldev
parent 20aa362a7d
commit 6f26ced3b5
15 changed files with 92 additions and 79 deletions

View File

@@ -44,7 +44,7 @@ class PrintFormatterTest : public testing::Test {
MockGraphicsAllocation *data;
MockKernel *kernel;
MockProgram program;
std::unique_ptr<MockProgram> program;
KernelInfo *kernelInfo;
Device *device;
@@ -61,7 +61,8 @@ class PrintFormatterTest : public testing::Test {
kernelInfo = KernelInfo::create();
device = MockDevice::createWithNewExecutionEnvironment<Device>(nullptr);
kernel = new MockKernel(&program, *kernelInfo, *device);
program = std::make_unique<MockProgram>();
kernel = new MockKernel(program.get(), *kernelInfo, *device);
printFormatter = new PrintFormatter(*kernel, *data);