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

AK: Add reverse iterator as member

This commit is contained in:
Federico Guerinoni 2022-03-05 14:05:56 +01:00 committed by Andreas Kling
parent f34fff852b
commit 0aed2f0f86
3 changed files with 14 additions and 0 deletions

View file

@ -567,4 +567,8 @@ TEST_CASE(reverse_range_for_loop)
int index = 9;
for (auto item : AK::ReverseWrapper::in_reverse(v))
EXPECT_EQ(item, index--);
index = 9;
for (auto item : v.in_reverse())
EXPECT_EQ(item, index--);
}