mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
Minor code cleanup
prevent nullptr dereference Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c2ab7fcf70
commit
575445dbb5
@@ -255,6 +255,12 @@ TEST_F(MigrationSyncDataTests, whenMigrationSyncDataExistsAndSetMultiStorageIsCa
|
||||
EXPECT_EQ(migrationSyncData, multiGraphicsAllocation.getMigrationSyncData());
|
||||
}
|
||||
|
||||
TEST(MigrationSyncDataTest, givenEmptyMultiGraphicsAllocationWhenSetMultiStorageIsCalledThenAbortIsCalled) {
|
||||
MultiGraphicsAllocation multiGraphicsAllocation(1);
|
||||
EXPECT_EQ(nullptr, multiGraphicsAllocation.getDefaultGraphicsAllocation());
|
||||
EXPECT_THROW(multiGraphicsAllocation.setMultiStorage(true), std::exception);
|
||||
}
|
||||
|
||||
TEST_F(MigrationSyncDataTests, whenMigrationIsNotStartedThenMigrationIsNotInProgress) {
|
||||
EXPECT_FALSE(migrationSyncData->isMigrationInProgress());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user