Skip to content

Commit

Permalink
Add end flip with state comparator test
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaMsln authored and dedlocc committed Nov 9, 2023
1 parent 1c573d4 commit d47420f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/correctness-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,19 @@ TEST(bimap, end_flip) {
EXPECT_EQ(b.end_right().flip(), b.end_left());
}

TEST(bimap, end_flip_with_state_comparator) {
bimap<int, int, state_comparator, state_comparator> b;
EXPECT_EQ(b.end_left().flip(), b.end_right());
EXPECT_EQ(b.end_right().flip(), b.end_left());

b.insert(1, 2);
b.insert(-3, 5);
b.insert(1000, -100000);

EXPECT_EQ(b.end_left().flip(), b.end_right());
EXPECT_EQ(b.end_right().flip(), b.end_left());
}

TEST(bimap, total_flip) {
bimap<int, int> b;
b.insert(100, -100);
Expand Down

0 comments on commit d47420f

Please sign in to comment.