mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
AK: Define operator== for HashMap
This commit is contained in:
parent
62e52163d6
commit
d47a22150d
Notes:
github-actions[bot]
2025-07-30 09:07:43 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: d47a22150d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5618
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/tcl3
2 changed files with 36 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue