AK: Define operator== for HashMap

This commit is contained in:
Aliaksandr Kalenik 2025-07-27 19:39:00 +02:00 committed by Andreas Kling
parent 62e52163d6
commit d47a22150d
Notes: github-actions[bot] 2025-07-30 09:07:43 +00:00
2 changed files with 36 additions and 0 deletions

View file

@ -353,3 +353,18 @@ TEST_CASE(update)
second.update(first);
EXPECT_EQ(4u, second.size());
}
TEST_CASE(compare)
{
HashMap<int, int> first;
HashMap<int, int> second;
EXPECT_EQ(first, second);
first.set(1, 10);
second.set(1, 10);
EXPECT_EQ(first, second);
first.set(2, 20);
EXPECT_NE(second, first);
}