fix: accept more than 16 root devices

Related-To: GSD-5892
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-09-05 15:33:39 +00:00
committed by Compute-Runtime-Automation
parent 73682494bc
commit 3845eb3b90
3 changed files with 11 additions and 8 deletions

View File

@@ -1705,8 +1705,8 @@ TEST(StackVec, GivenStackVecWithDynamicMemWhenSelfAssignedThenMemoryIsReused) {
}
TEST(StackVec, whenPushingUniqueToRootDeviceIndicesContainerThenOnlyUniqueValuesArePopulated) {
StackVec<uint32_t, 8> input = {6, 5, 4, 3, 2, 1, 5, 4, 5, 4, 2, 4, 3, 1, 6, 1};
ASSERT_EQ(input.size(), 16u);
StackVec<uint32_t, 8> input = {6, 5, 4, 3, 2, 1, 5, 4, 5, 4, 2, 4, 3, 1, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0};
ASSERT_EQ(input.size(), 27u);
RootDeviceIndicesContainer rootDeviceIndices{};
@@ -1714,8 +1714,8 @@ TEST(StackVec, whenPushingUniqueToRootDeviceIndicesContainerThenOnlyUniqueValues
rootDeviceIndices.pushUnique(index);
}
EXPECT_EQ(rootDeviceIndices.size(), 6u);
const RootDeviceIndicesContainer expectedContainer = {6, 5, 4, 3, 2, 1};
EXPECT_EQ(rootDeviceIndices.size(), 17u);
const RootDeviceIndicesContainer expectedContainer = {6, 5, 4, 3, 2, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0};
for (auto i = 0u; i < rootDeviceIndices.size(); i++) {
EXPECT_EQ(rootDeviceIndices[i], expectedContainer[i]);
}