Skip to content

Commit d2112ff

Browse files
committed
Add test for issue #292.
1 parent a1723a1 commit d2112ff

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/node_hash_set_test.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ TEST(THIS_TEST_NAME, MergeExtractInsert) {
105105
EXPECT_THAT(set2, UnorderedElementsAre(Pointee(7), Pointee(23)));
106106
}
107107

108+
TEST(THIS_TEST_NAME, Emplace) {
109+
using Thing = std::tuple<size_t, double>;
110+
phmap::THIS_HASH_SET<Thing> hs;
111+
hs.emplace(Thing(0, 1.25));
112+
hs.emplace(0, 1.3);
113+
assert(hs.find(Thing(0, 1.3)) != hs.end());
114+
}
115+
108116
} // namespace
109117
} // namespace priv
110118
} // namespace phmap

0 commit comments

Comments
 (0)