|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for Aleph::FlatMap (tpl_flat_map.H). More...
#include <iterator>#include <limits>#include <map>#include <new>#include <random>#include <stdexcept>#include <string>#include <utility>#include <vector>#include <gtest/gtest.h>#include <tpl_flat_map.H>Go to the source code of this file.
Functions | |
| TEST (FlatMap, EmptyMapBasics) | |
| TEST (FlatMap, SubscriptInsertsAndUpdates) | |
| TEST (FlatMap, AtThrowsOnMissingKey) | |
| TEST (FlatMap, InitializerListDropsDuplicateKeysFirstWins) | |
| TEST (FlatMap, RangeConstructorAcceptsIteratorsWithoutArrow) | |
| TEST (FlatMap, RangeConstructorAcceptsOwnIteratorAndConstIterator) | |
| TEST (FlatMap, InsertRejectsDuplicateInsertOrAssignOverwrites) | |
| TEST (FlatMap, EraseByKeyAndIterator) | |
| TEST (FlatMap, ProxyIterationAndStructuredBindings) | |
| TEST (FlatMap, IteratorRandomAccessOperations) | |
| TEST (FlatMap, BoundsAndEqualRange) | |
| TEST (FlatMap, KeysAndValuesLists) | |
| TEST (FlatMap, TraverseMutatingAndEarlyStop) | |
| TEST (FlatMap, CopyMoveEqualityAndSwap) | |
| TEST (FlatMap, CustomComparatorDescendingOrder) | |
| TEST (FlatMap, ParallelStorageAccessors) | |
| TEST (FlatMap, RandomizedParityWithStdMap) | |
| TEST (FlatMap, InsertedValueMayBeAnEntryOfTheSameMap) | |
| TEST (FlatMap, InsertedKeyMayBeAValueOfTheSameMap) | |
| TEST (FlatMap, CopyThatThrowsLeavesTheMapUntouched) | |
| TEST (FlatMap, CopyAssignmentThatThrowsLeavesTheTargetUntouched) | |
| TEST (FlatMap, MoveThatThrowsAtAnyPointLeavesAValidMap) | |
| TEST (FlatMap, FailureBeforeAnyEntryMovesKeepsTheMap) | |
| TEST (FlatMap, MoveThatThrowsWhileAnInsertionGrowsLeavesAValidMap) | |
| TEST (FlatMap, FailedGrowthOfAMapEmptiedByAMoveLeavesItEmpty) | |
Tests for Aleph::FlatMap (tpl_flat_map.H).
Covers construction, operator[]/at, insert/insert_or_assign/emplace, erase, proxy iterators (structured bindings, value mutation through iterators), keys()/values(), traverse, and a randomized parity check against std::map as the reference implementation.
Definition in file flat_map_test.cc.
| TEST | ( | FlatMap | , |
| AtThrowsOnMissingKey | |||
| ) |
Definition at line 229 of file flat_map_test.cc.
References Aleph::FlatMap< Key, T, Compare >::at(), and m.
| TEST | ( | FlatMap | , |
| BoundsAndEqualRange | |||
| ) |
Definition at line 365 of file flat_map_test.cc.
References StlAlephIterator< SetName >::end(), and m.
| TEST | ( | FlatMap | , |
| CopyAssignmentThatThrowsLeavesTheTargetUntouched | |||
| ) |
Definition at line 573 of file flat_map_test.cc.
References Aleph::FlatMap< Key, T, Compare >::insert(), k, Aleph::FlatMap< Key, T, Compare >::nth_key(), Aleph::FlatMap< Key, T, Compare >::nth_value(), and Aleph::FlatMap< Key, T, Compare >::size().
| TEST | ( | FlatMap | , |
| CopyMoveEqualityAndSwap | |||
| ) |
Definition at line 411 of file flat_map_test.cc.
References Aleph::copy(), m, OhashCommon< HashTbl, Key >::size(), Aleph::FlatMap< Key, T, Compare >::size(), and Aleph::ODhashTable< Key, Cmp >::swap().
| TEST | ( | FlatMap | , |
| CopyThatThrowsLeavesTheMapUntouched | |||
| ) |
Definition at line 553 of file flat_map_test.cc.
References Aleph::ODhashTable< Key, Cmp >::contains(), OhashCommon< HashTbl, Key >::insert(), k, m, OhashCommon< HashTbl, Key >::size(), and value.
| TEST | ( | FlatMap | , |
| CustomComparatorDescendingOrder | |||
| ) |
Definition at line 430 of file flat_map_test.cc.
References m.
| TEST | ( | FlatMap | , |
| EmptyMapBasics | |||
| ) |
| TEST | ( | FlatMap | , |
| EraseByKeyAndIterator | |||
| ) |
Definition at line 301 of file flat_map_test.cc.
References StlAlephIterator< SetName >::end(), OhashCommon< HashTbl, Key >::find(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| FailedGrowthOfAMapEmptiedByAMoveLeavesItEmpty | |||
| ) |
Definition at line 733 of file flat_map_test.cc.
References check(), Aleph::FlatMap< Key, T, Compare >::size(), and Aleph::Value.
| TEST | ( | FlatMap | , |
| FailureBeforeAnyEntryMovesKeepsTheMap | |||
| ) |
Definition at line 660 of file flat_map_test.cc.
References OhashCommon< HashTbl, Key >::capacity(), Aleph::ODhashTable< Key, Cmp >::contains(), OhashCommon< HashTbl, Key >::insert(), k, m, OhashCommon< HashTbl, Key >::size(), and Aleph::Value.
| TEST | ( | FlatMap | , |
| InitializerListDropsDuplicateKeysFirstWins | |||
| ) |
Definition at line 240 of file flat_map_test.cc.
References m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| InsertedKeyMayBeAValueOfTheSameMap | |||
| ) |
Definition at line 531 of file flat_map_test.cc.
References OhashCommon< HashTbl, Key >::capacity(), OhashCommon< HashTbl, Key >::insert(), m, Aleph::next(), and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| InsertedValueMayBeAnEntryOfTheSameMap | |||
| ) |
Definition at line 499 of file flat_map_test.cc.
References OhashCommon< HashTbl, Key >::capacity(), OhashCommon< HashTbl, Key >::insert(), m, Aleph::next(), and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| InsertRejectsDuplicateInsertOrAssignOverwrites | |||
| ) |
Definition at line 283 of file flat_map_test.cc.
References OhashCommon< HashTbl, Key >::insert(), and m.
| TEST | ( | FlatMap | , |
| IteratorRandomAccessOperations | |||
| ) |
Definition at line 347 of file flat_map_test.cc.
References StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), and m.
| TEST | ( | FlatMap | , |
| KeysAndValuesLists | |||
| ) |
Definition at line 380 of file flat_map_test.cc.
References OhashCommon< HashTbl, Key >::keys(), and m.
| TEST | ( | FlatMap | , |
| MoveThatThrowsAtAnyPointLeavesAValidMap | |||
| ) |
Definition at line 598 of file flat_map_test.cc.
References OhashCommon< HashTbl, Key >::capacity(), Aleph::ODhashTable< Key, Cmp >::contains(), OhashCommon< HashTbl, Key >::insert(), OhashCommon< HashTbl, Key >::is_empty(), k, m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| MoveThatThrowsWhileAnInsertionGrowsLeavesAValidMap | |||
| ) |
Definition at line 695 of file flat_map_test.cc.
References OhashCommon< HashTbl, Key >::capacity(), Aleph::completed(), Aleph::ODhashTable< Key, Cmp >::contains(), OhashCommon< HashTbl, Key >::insert(), OhashCommon< HashTbl, Key >::is_empty(), k, m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| ParallelStorageAccessors | |||
| ) |
Definition at line 440 of file flat_map_test.cc.
References m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| ProxyIterationAndStructuredBindings | |||
| ) |
Definition at line 318 of file flat_map_test.cc.
References StlAlephIterator< SetName >::end(), OhashCommon< HashTbl, Key >::find(), k, m, and Aleph::sum().
| TEST | ( | FlatMap | , |
| RandomizedParityWithStdMap | |||
| ) |
Definition at line 451 of file flat_map_test.cc.
References Aleph::FlatMap< Key, T, Compare >::at(), Aleph::FlatMap< Key, T, Compare >::contains(), Aleph::FlatMap< Key, T, Compare >::erase(), Aleph::FlatMap< Key, T, Compare >::insert(), k, Aleph::FlatMap< Key, T, Compare >::nth_key(), Aleph::FlatMap< Key, T, Compare >::nth_value(), rng, and Aleph::FlatMap< Key, T, Compare >::size().
| TEST | ( | FlatMap | , |
| RangeConstructorAcceptsIteratorsWithoutArrow | |||
| ) |
Definition at line 250 of file flat_map_test.cc.
References m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| RangeConstructorAcceptsOwnIteratorAndConstIterator | |||
| ) |
| TEST | ( | FlatMap | , |
| SubscriptInsertsAndUpdates | |||
| ) |
Definition at line 207 of file flat_map_test.cc.
References m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| TraverseMutatingAndEarlyStop | |||
| ) |
Definition at line 394 of file flat_map_test.cc.
References k, m, GenericTraverse< Container >::traverse(), and Aleph::FlatMap< Key, T, Compare >::traverse().