Enhance unit test

- expect makeResident calls based on number of ISAs

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-04-28 14:32:30 +00:00
committed by Compute-Runtime-Automation
parent 819d648997
commit 702feba063

View File

@@ -883,7 +883,10 @@ HWTEST_F(NotifyModuleLoadTest, givenDebuggingEnabledWhenModuleWithUnresolvedSymb
EXPECT_TRUE(ki->isIsaCopiedToAllocation());
}
EXPECT_EQ(4, memoryOperationsHandler->makeResidentCalledCount);
auto numIsaAllocations = module->getKernelImmutableDataVector().size();
EXPECT_NE(0u, numIsaAllocations);
auto expectedMakeResidentCallsCount = static_cast<int>(numIsaAllocations);
EXPECT_EQ(expectedMakeResidentCallsCount, memoryOperationsHandler->makeResidentCalledCount);
}
} // namespace ult
} // namespace L0