Add missing unit test

Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2021-04-20 14:42:58 +00:00
committed by Compute-Runtime-Automation
parent d2dd2dfb97
commit c0b1b79a8f

View File

@ -189,6 +189,16 @@ HWTEST_F(DeviceTest, givenNoHwCsrTypeAndModifiedDefaultEngineIndexWhenIsSimulati
}
}
TEST_F(DeviceTest, givenRootDeviceWithSubDevicesWhenCreatingThenRootDeviceContextIsInitialized) {
DebugManagerStateRestore restore{};
DebugManager.flags.DeferOsContextInitialization.set(1);
UltDeviceFactory factory(1, 2);
MockDevice &device = *factory.rootDevices[0];
EXPECT_TRUE(device.getDefaultEngine().osContext->isInitialized());
}
HWTEST_F(DeviceTest, givenDeviceWithoutSubDevicesWhenCreatingContextsThenMemoryManagerDefaultContextIsSetCorrectly) {
UltDeviceFactory factory(1, 1);
MockDevice &device = *factory.rootDevices[0];