|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Aleph::FlatMap (tpl_flat_map.H). More...
#include <iterator>#include <map>#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) | |
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 134 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and m.
| TEST | ( | FlatMap | , |
| BoundsAndEqualRange | |||
| ) |
Definition at line 270 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), StlAlephIterator< SetName >::end(), and m.
| TEST | ( | FlatMap | , |
| CopyMoveEqualityAndSwap | |||
| ) |
Definition at line 316 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::copy(), m, OhashCommon< HashTbl, Key >::size(), and Aleph::ODhashTable< Key, Cmp >::swap().
| TEST | ( | FlatMap | , |
| CustomComparatorDescendingOrder | |||
| ) |
Definition at line 335 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and m.
| TEST | ( | FlatMap | , |
| EmptyMapBasics | |||
| ) |
Definition at line 102 of file flat_map_test.cc.
References StlAlephIterator< SetName >::begin(), Aleph::blossom_maximum_cardinality_matching(), Aleph::ODhashTable< Key, Cmp >::contains(), StlAlephIterator< SetName >::end(), OhashCommon< HashTbl, Key >::find(), OhashCommon< HashTbl, Key >::is_empty(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| EraseByKeyAndIterator | |||
| ) |
Definition at line 206 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), StlAlephIterator< SetName >::end(), OhashCommon< HashTbl, Key >::find(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| InitializerListDropsDuplicateKeysFirstWins | |||
| ) |
Definition at line 145 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| InsertRejectsDuplicateInsertOrAssignOverwrites | |||
| ) |
Definition at line 188 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), and m.
| TEST | ( | FlatMap | , |
| IteratorRandomAccessOperations | |||
| ) |
Definition at line 252 of file flat_map_test.cc.
References StlAlephIterator< SetName >::begin(), Aleph::blossom_maximum_cardinality_matching(), StlAlephIterator< SetName >::end(), and m.
| TEST | ( | FlatMap | , |
| KeysAndValuesLists | |||
| ) |
Definition at line 285 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::keys(), and m.
| TEST | ( | FlatMap | , |
| ParallelStorageAccessors | |||
| ) |
Definition at line 345 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| ProxyIterationAndStructuredBindings | |||
| ) |
Definition at line 223 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), StlAlephIterator< SetName >::end(), OhashCommon< HashTbl, Key >::find(), k, m, and Aleph::sum().
| TEST | ( | FlatMap | , |
| RandomizedParityWithStdMap | |||
| ) |
Definition at line 356 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), k, and rng.
| TEST | ( | FlatMap | , |
| RangeConstructorAcceptsIteratorsWithoutArrow | |||
| ) |
Definition at line 155 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| RangeConstructorAcceptsOwnIteratorAndConstIterator | |||
| ) |
Definition at line 172 of file flat_map_test.cc.
References Aleph::FlatMap< Key, T, Compare >::begin(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::FlatMap< Key, T, Compare >::end().
| TEST | ( | FlatMap | , |
| SubscriptInsertsAndUpdates | |||
| ) |
Definition at line 112 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), m, and OhashCommon< HashTbl, Key >::size().
| TEST | ( | FlatMap | , |
| TraverseMutatingAndEarlyStop | |||
| ) |
Definition at line 299 of file flat_map_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), k, m, and GenericTraverse< Container >::traverse().