mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Use make_unique to create mock devices.
Change-Id: Ifd3cb1e7594d736d9f783c08b947637de6a876ea
This commit is contained in:
committed by
sys_ocldev
parent
b83696c1b0
commit
6d5162552b
@@ -31,7 +31,7 @@
|
||||
using namespace OCLRT;
|
||||
|
||||
TEST(DebugKernelTest, givenKernelCompiledForDebuggingWhenGetDebugSurfaceBtiIsCalledThenCorrectValueIsReturned) {
|
||||
std::unique_ptr<MockDevice> device(new MockDevice(*platformDevices[0]));
|
||||
auto device = std::make_unique<MockDevice>(*platformDevices[0]);
|
||||
MockProgram program;
|
||||
program.enableKernelDebug();
|
||||
std::unique_ptr<MockKernel> kernel(MockKernel::create<MockDebugKernel>(*device.get(), &program));
|
||||
@@ -40,7 +40,7 @@ TEST(DebugKernelTest, givenKernelCompiledForDebuggingWhenGetDebugSurfaceBtiIsCal
|
||||
}
|
||||
|
||||
TEST(DebugKernelTest, givenKernelCompiledForDebuggingWhenGetPerThreadSystemThreadSurfaceSizeIsCalledThenCorrectValueIsReturned) {
|
||||
std::unique_ptr<MockDevice> device(new MockDevice(*platformDevices[0]));
|
||||
auto device = std::make_unique<MockDevice>(*platformDevices[0]);
|
||||
MockProgram program;
|
||||
program.enableKernelDebug();
|
||||
std::unique_ptr<MockDebugKernel> kernel(MockKernel::create<MockDebugKernel>(*device.get(), &program));
|
||||
@@ -49,7 +49,7 @@ TEST(DebugKernelTest, givenKernelCompiledForDebuggingWhenGetPerThreadSystemThrea
|
||||
}
|
||||
|
||||
TEST(DebugKernelTest, givenKernelWithoutDebugFlagWhenGetDebugSurfaceBtiIsCalledThenInvalidIndexValueIsReturned) {
|
||||
std::unique_ptr<MockDevice> device(new MockDevice(*platformDevices[0]));
|
||||
auto device = std::make_unique<MockDevice>(*platformDevices[0]);
|
||||
MockProgram program;
|
||||
program.enableKernelDebug();
|
||||
std::unique_ptr<MockKernel> kernel(MockKernel::create<MockKernel>(*device.get(), &program));
|
||||
@@ -58,7 +58,7 @@ TEST(DebugKernelTest, givenKernelWithoutDebugFlagWhenGetDebugSurfaceBtiIsCalledT
|
||||
}
|
||||
|
||||
TEST(DebugKernelTest, givenKernelWithoutDebugFlagWhenGetPerThreadSystemThreadSurfaceSizeIsCalledThenZeroIsReturned) {
|
||||
std::unique_ptr<MockDevice> device(new MockDevice(*platformDevices[0]));
|
||||
auto device = std::make_unique<MockDevice>(*platformDevices[0]);
|
||||
MockProgram program;
|
||||
program.enableKernelDebug();
|
||||
std::unique_ptr<MockKernel> kernel(MockKernel::create<MockKernel>(*device.get(), &program));
|
||||
|
||||
Reference in New Issue
Block a user