Correct validation during creating command queue

check if device is associated with context

Related-To: NEO-3691
Change-Id: I7dfe12376bb2bb2c764b471315072a29068a0cb7
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-03-24 15:05:12 +01:00
committed by sys_ocldev
parent 70d50616d0
commit a651625473
8 changed files with 54 additions and 12 deletions

View File

@@ -411,3 +411,15 @@ TEST(Context, givenContextWhenCheckIfAllocationsAreMultiStorageThenReturnProperV
context.contextType = ContextType::CONTEXT_TYPE_UNRESTRICTIVE;
EXPECT_TRUE(context.areMultiStorageAllocationsPreferred());
}
TEST(Context, givenContextWhenIsDeviceAssociatedIsCalledWithItsDeviceThenTrueIsReturned) {
MockContext context;
EXPECT_TRUE(context.isDeviceAssociated(*context.getDevice(0)));
}
TEST(Context, givenContextWhenIsDeviceAssociatedIsCalledWithNotAssociatedDeviceThenFalseIsReturned) {
MockContext context0;
MockContext context1;
EXPECT_FALSE(context0.isDeviceAssociated(*context1.getDevice(0)));
EXPECT_FALSE(context1.isDeviceAssociated(*context0.getDevice(0)));
}