|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Aleph::ConcurrentHashMap (tpl_concurrent_hash_map.H). More...
#include <gtest/gtest.h>#include "concurrency_test_utils.H"#include <tpl_concurrent_hash_map.H>#include <atomic>#include <map>#include <memory>#include <stdexcept>#include <string>#include <thread>#include <vector>Go to the source code of this file.
Functions | |
| TEST (ConcurrentHashMap, DefaultConstructedMapIsEmpty) | |
| TEST (ConcurrentHashMap, InsertRejectsDuplicateKeys) | |
| TEST (ConcurrentHashMap, InsertMoveOverloadIsSupported) | |
| TEST (ConcurrentHashMap, ContainsAndFindCopyReflectState) | |
| TEST (ConcurrentHashMap, InsertOrAssignInsertsThenOverwrites) | |
| TEST (ConcurrentHashMap, EraseReturnsFalseForMissingKey) | |
| TEST (ConcurrentHashMap, WithValueSeesCurrentValueAndSkipsMissingKeys) | |
| TEST (ConcurrentHashMap, WithValueMutMutatesInPlace) | |
| TEST (ConcurrentHashMap, ClearRemovesEveryEntry) | |
| TEST (ConcurrentHashMap, SnapshotReturnsIndependentCopy) | |
| TEST (ConcurrentHashMap, FailedInsertCopyLeavesMapUnchanged) | |
| TEST (ConcurrentHashMap, DifferentShardsAllowConcurrentWriters) | |
| TEST (ConcurrentHashMap, ConcurrentInsertFindMutateEraseIsRaceFree) | |
| TEST (ConcurrentHashMap, RandomizedOperationTraceMatchesSequentialReferenceModel) | |
Tests for Aleph::ConcurrentHashMap (tpl_concurrent_hash_map.H).
Definition in file concurrent_hash_map_test.cc.
| TEST | ( | ConcurrentHashMap | , |
| ClearRemovesEveryEntry | |||
| ) |
Definition at line 165 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::clear(), OhashCommon< HashTbl, Key >::insert(), OhashCommon< HashTbl, Key >::is_empty(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | ConcurrentHashMap | , |
| ConcurrentInsertFindMutateEraseIsRaceFree | |||
| ) |
Definition at line 236 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::ODhashTable< Key, Cmp >::contains(), OhashCommon< HashTbl, Key >::insert(), m, Aleph::Testing::run_workers(), and OhashCommon< HashTbl, Key >::size().
| TEST | ( | ConcurrentHashMap | , |
| ContainsAndFindCopyReflectState | |||
| ) |
Definition at line 108 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::ODhashTable< Key, Cmp >::contains(), OhashCommon< HashTbl, Key >::insert(), and m.
| TEST | ( | ConcurrentHashMap | , |
| DefaultConstructedMapIsEmpty | |||
| ) |
Definition at line 80 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::is_empty(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | ConcurrentHashMap | , |
| DifferentShardsAllowConcurrentWriters | |||
| ) |
Definition at line 215 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), m, Aleph::Testing::run_workers(), and OhashCommon< HashTbl, Key >::size().
| TEST | ( | ConcurrentHashMap | , |
| EraseReturnsFalseForMissingKey | |||
| ) |
Definition at line 131 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), OhashCommon< HashTbl, Key >::is_empty(), and m.
| TEST | ( | ConcurrentHashMap | , |
| FailedInsertCopyLeavesMapUnchanged | |||
| ) |
Definition at line 198 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::ODhashTable< Key, Cmp >::contains(), OhashCommon< HashTbl, Key >::insert(), m, OhashCommon< HashTbl, Key >::size(), and value.
| TEST | ( | ConcurrentHashMap | , |
| InsertMoveOverloadIsSupported | |||
| ) |
Definition at line 96 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), and m.
| TEST | ( | ConcurrentHashMap | , |
| InsertOrAssignInsertsThenOverwrites | |||
| ) |
Definition at line 121 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | ConcurrentHashMap | , |
| InsertRejectsDuplicateKeys | |||
| ) |
Definition at line 87 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | ConcurrentHashMap | , |
| RandomizedOperationTraceMatchesSequentialReferenceModel | |||
| ) |
Definition at line 284 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::ConcurrentHashMap< Key, T, Cmp, Shards >::contains(), Aleph::ConcurrentHashMap< Key, T, Cmp, Shards >::erase(), Aleph::ConcurrentHashMap< Key, T, Cmp, Shards >::insert(), Aleph::Testing::make_random_operation_trace(), and value.
| TEST | ( | ConcurrentHashMap | , |
| SnapshotReturnsIndependentCopy | |||
| ) |
Definition at line 177 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), FunctionalMethods< Container, T >::emplace(), OhashCommon< HashTbl, Key >::insert(), and m.
| TEST | ( | ConcurrentHashMap | , |
| WithValueMutMutatesInPlace | |||
| ) |
Definition at line 155 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), and m.
| TEST | ( | ConcurrentHashMap | , |
| WithValueSeesCurrentValueAndSkipsMissingKeys | |||
| ) |
Definition at line 141 of file concurrent_hash_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), and m.