1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:07:34 +00:00

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

View file

@ -47,6 +47,13 @@ TEST_CASE(enumeration)
actual_size++; actual_size++;
} }
EXPECT_EQ(expected_size, 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()) { while (auto elem = list.take_first()) {
delete elem; delete elem;
} }