mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Tests: Add test coverage for AK::IntrusiveList reverse iterator support
This commit is contained in:
parent
ef4fdcf76f
commit
ce74fce0df
Notes:
sideshowbarker
2024-07-18 16:57:47 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/ce74fce0df9 Pull-request: https://github.com/SerenityOS/serenity/pull/7728
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue