mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-30 00:50:38 +08:00
Fix incorrect code in parallel_node_hash_set emplace. (#293)
* Fix incorrect code in `parallel_node_hash_set` emplace. * Add test for issue #292.
This commit is contained in:
committed by
GitHub
parent
4e410c7af3
commit
fa5a89fe79
@@ -105,6 +105,14 @@ TEST(THIS_TEST_NAME, MergeExtractInsert) {
|
||||
EXPECT_THAT(set2, UnorderedElementsAre(Pointee(7), Pointee(23)));
|
||||
}
|
||||
|
||||
TEST(THIS_TEST_NAME, Emplace) {
|
||||
using Thing = std::tuple<size_t, double>;
|
||||
phmap::THIS_HASH_SET<Thing> hs;
|
||||
hs.emplace(Thing(0, 1.25));
|
||||
hs.emplace(0, 1.3);
|
||||
assert(hs.find(Thing(0, 1.3)) != hs.end());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace priv
|
||||
} // namespace phmap
|
||||
|
||||
Reference in New Issue
Block a user