Tests: Add test coverage for AK::IntrusiveList reverse iterator support

This commit is contained in:
Brian Gianforcaro 2021-06-03 03:19:23 -07:00 committed by Andreas Kling
parent ef4fdcf76f
commit ce74fce0df
Notes: sideshowbarker 2024-07-18 16:57:47 +09:00

View file

@ -47,6 +47,13 @@ TEST_CASE(enumeration)
actual_size++;
}
EXPECT_EQ(expected_size, actual_size);
size_t reverse_actual_size = 0;
for (auto it = list.rbegin(); it != list.rend(); ++it) {
reverse_actual_size++;
}
EXPECT_EQ(expected_size, reverse_actual_size);
while (auto elem = list.take_first()) {
delete elem;
}