Use MockCommandQueue instead of CommandQueue in unit tests

Change-Id: I617e77f2680d6d22381b7fde702a551413295266
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-03-04 15:28:58 +01:00
committed by sys_ocldev
parent fa6608d20e
commit f31304a9ad
22 changed files with 284 additions and 299 deletions

View File

@@ -98,7 +98,7 @@ TEST(CommandTest, givenWaitlistRequestWhenCommandComputeKernelIsCreatedThenMakeL
};
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
CommandQueue cmdQ(nullptr, device.get(), nullptr);
MockCommandQueue cmdQ(nullptr, device.get(), nullptr);
MockKernelWithInternals kernel(*device);
IndirectHeap *ih1 = nullptr, *ih2 = nullptr, *ih3 = nullptr;
@@ -130,7 +130,7 @@ TEST(CommandTest, givenWaitlistRequestWhenCommandComputeKernelIsCreatedThenMakeL
TEST(KernelOperationDestruction, givenKernelOperationWhenItIsDestructedThenAllAllocationsAreStoredInInternalStorageForReuse) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
CommandQueue cmdQ(nullptr, device.get(), nullptr);
MockCommandQueue cmdQ(nullptr, device.get(), nullptr);
InternalAllocationStorage &allocationStorage = *device->getDefaultEngine().commandStreamReceiver->getInternalAllocationStorage();
auto &allocationsForReuse = allocationStorage.getAllocationsForReuse();