|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for Dynsethash. More...
#include <algorithm>#include <stdexcept>#include <vector>#include <string>#include <type_traits>#include <gtest/gtest.h>#include <tpl_dynSetHash.H>Go to the source code of this file.
Classes | |
| struct | Point |
| struct | std::hash< Point > |
Namespaces | |
| namespace | std |
| STL namespace. | |
Functions | |
| TEST (DynHashTable, EmptyTableProperties) | |
| TEST (DynHashTable, InsertSingleElement) | |
| TEST (DynHashTable, InsertMultipleElements) | |
| TEST (DynHashTable, InsertRejectsDuplicates) | |
| TEST (DynHashTable, SearchFindsExistingKey) | |
| TEST (DynHashTable, SearchReturnsNullForMissingKey) | |
| TEST (DynHashTable, FindReturnsReference) | |
| TEST (DynHashTable, FindThrowsIfNotFound) | |
| TEST (DynHashTable, SearchOrInsertBehavior) | |
| TEST (DynHashTable, ContainsOrInsertBehavior) | |
| TEST (DynHashTable, AddAndAppendAliases) | |
| TEST (DynHashTable, MoveInsert) | |
| TEST (DynHashTable, RemoveByKey) | |
| TEST (DynHashTable, RemoveThrowsIfNotFound) | |
| TEST (DynHashTable, RemoveByPointer) | |
| TEST (DynHashTable, RemoveAllElements) | |
| TEST (DynHashTable, EmptyMethod) | |
| TEST (DynHashTable, CopyConstructor) | |
| TEST (DynHashTable, CopyAssignment) | |
| TEST (DynHashTable, SelfAssignment) | |
| TEST (DynHashTable, MoveConstructor) | |
| TEST (DynHashTable, MoveAssignment) | |
| TEST (DynHashTable, Swap) | |
| TEST (DynHashTable, IteratorEmptyTable) | |
| TEST (DynHashTable, IteratorTraversal) | |
| TEST (DynHashTable, IteratorDel) | |
| TEST (DynHashTable, GetFirstAndLast) | |
| TEST (DynHashTable, StringKeys) | |
| TEST (DynHashTable, LargeNumberOfInsertions) | |
| TEST (DynHashTable, ManyCollisions) | |
| TEST (DynHashTable, RandomInsertRemove) | |
| TEST (DynHashTable, RehashingBehavior) | |
| TEST (DynMapHashTable, EmptyMapProperties) | |
| TEST (DynMapHashTable, InsertPair) | |
| TEST (DynMapHashTable, InsertMultiplePairs) | |
| TEST (DynMapHashTable, InsertRejectsDuplicateKeys) | |
| TEST (DynMapHashTable, SearchByKey) | |
| TEST (DynMapHashTable, FindByKey) | |
| TEST (DynMapHashTable, SearchWithoutDefaultConstructibleData) | |
| TEST (DynMapHashTable, OperatorBracketInsert) | |
| TEST (DynMapHashTable, OperatorBracketConstThrows) | |
| TEST (DynMapHashTable, RemoveByKey) | |
| TEST (DynMapHashTable, Keys) | |
| TEST (DynMapHashTable, Values) | |
| TEST (DynMapHashTable, ValuesPtr) | |
| TEST (DynMapHashTable, ItemsPtr) | |
| TEST (DynMapHashTable, MoveSemantics) | |
| TEST (DynHashTableFunctions, Join) | |
| TEST (DynHashTableFunctions, Intercept) | |
| TEST (DynHashTableFunctions, Unique) | |
| TEST (DynHashTableFunctions, Repeated) | |
| TEST (DynHashTableFunctions, RepeatedWithIndex) | |
| TEST (DynHashTable, LinearHashTableBasics) | |
| TEST (DynHashTable, DynSetHashAlias) | |
| TEST (DynHashTable, SingleElement) | |
| TEST (DynHashTable, InsertRemoveRepeated) | |
| TEST (DynHashTable, CustomHashFunction) | |
| size_t | point_hash (const Point &p) |
| TEST (DynHashTable, CustomType) | |
| TEST (DynSetLhashMove, TakesTheListsAndLeavesAUsableTableWithoutThem) | |
| TEST (DynSetLhashMove, TheTableThatWasMovedFromKeepsItsFunctionAndItsPolicy) | |
| TEST (DynSetLhashMove, TheTableThatWasMovedFromKeepsItsLoadThresholds) | |
| TEST (DynSetLhashMove, ATableWithoutListsIsATableLikeAnyOther) | |
| TEST (DynMapHashMove, TakesThePairsAndLeavesAUsableMap) | |
| int | main (int argc, char **argv) |
Tests for Dynsethash.
Definition in file dynsethash.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1478 of file dynsethash.cc.
| size_t point_hash | ( | const Point & | p | ) |
Definition at line 1047 of file dynsethash.cc.
Referenced by TEST().
| TEST | ( | DynHashTable | , |
| AddAndAppendAliases | |||
| ) |
Definition at line 205 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::add(), and Aleph::DynHashTable< Key, HashTable, Cmp >::append().
| TEST | ( | DynHashTable | , |
| ContainsOrInsertBehavior | |||
| ) |
Definition at line 185 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains_or_insert().
| TEST | ( | DynHashTable | , |
| CopyAssignment | |||
| ) |
Definition at line 337 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| CopyConstructor | |||
| ) |
Definition at line 318 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| CustomHashFunction | |||
| ) |
Definition at line 1004 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), custom_hash(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and k.
| TEST | ( | DynHashTable | , |
| CustomType | |||
| ) |
Definition at line 1052 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and point_hash().
| TEST | ( | DynHashTable | , |
| DynSetHashAlias | |||
| ) |
Definition at line 958 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| EmptyMethod | |||
| ) |
Definition at line 295 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::clear(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty().
| TEST | ( | DynHashTable | , |
| EmptyTableProperties | |||
| ) |
| TEST | ( | DynHashTable | , |
| FindReturnsReference | |||
| ) |
Definition at line 135 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::find(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| FindThrowsIfNotFound | |||
| ) |
Definition at line 154 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::find(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| GetFirstAndLast | |||
| ) |
Definition at line 477 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::get_first(), Aleph::DynHashTable< Key, HashTable, Cmp >::get_last(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| InsertMultipleElements | |||
| ) |
Definition at line 78 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| InsertRejectsDuplicates | |||
| ) |
Definition at line 98 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| InsertRemoveRepeated | |||
| ) |
Definition at line 986 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| InsertSingleElement | |||
| ) |
| TEST | ( | DynHashTable | , |
| IteratorDel | |||
| ) |
Definition at line 460 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| IteratorEmptyTable | |||
| ) |
Definition at line 433 of file dynsethash.cc.
| TEST | ( | DynHashTable | , |
| IteratorTraversal | |||
| ) |
Definition at line 441 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), keys, and Aleph::sort().
| TEST | ( | DynHashTable | , |
| LargeNumberOfInsertions | |||
| ) |
Definition at line 512 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| LinearHashTableBasics | |||
| ) |
Definition at line 946 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| ManyCollisions | |||
| ) |
Definition at line 527 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| MoveAssignment | |||
| ) |
Definition at line 386 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty().
| TEST | ( | DynHashTable | , |
| MoveConstructor | |||
| ) |
Definition at line 370 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty().
| TEST | ( | DynHashTable | , |
| MoveInsert | |||
| ) |
Definition at line 220 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| RandomInsertRemove | |||
| ) |
Definition at line 543 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RehashingBehavior | |||
| ) |
Definition at line 574 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RemoveAllElements | |||
| ) |
Definition at line 279 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RemoveByKey | |||
| ) |
Definition at line 235 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RemoveByPointer | |||
| ) |
Definition at line 260 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RemoveThrowsIfNotFound | |||
| ) |
Definition at line 251 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| SearchFindsExistingKey | |||
| ) |
Definition at line 112 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynHashTable | , |
| SearchOrInsertBehavior | |||
| ) |
Definition at line 167 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::search_or_insert().
| TEST | ( | DynHashTable | , |
| SearchReturnsNullForMissingKey | |||
| ) |
Definition at line 125 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynHashTable | , |
| SelfAssignment | |||
| ) |
Definition at line 356 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| SingleElement | |||
| ) |
| TEST | ( | DynHashTable | , |
| StringKeys | |||
| ) |
Definition at line 494 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| Swap | |||
| ) |
Definition at line 407 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTableFunctions | , |
| Intercept | |||
| ) |
Definition at line 864 of file dynsethash.cc.
References Aleph::intercept(), l1, l2, and Aleph::sort().
| TEST | ( | DynHashTableFunctions | , |
| Join | |||
| ) |
Definition at line 849 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::join(), l1, and l2.
| TEST | ( | DynHashTableFunctions | , |
| Repeated | |||
| ) |
Definition at line 896 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), l, and Aleph::repeated().
| TEST | ( | DynHashTableFunctions | , |
| RepeatedWithIndex | |||
| ) |
Definition at line 915 of file dynsethash.cc.
References l, and Aleph::repeated_with_index().
| TEST | ( | DynHashTableFunctions | , |
| Unique | |||
| ) |
Definition at line 882 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), l, and Aleph::unique().
| TEST | ( | DynMapHashMove | , |
| TakesThePairsAndLeavesAUsableMap | |||
| ) |
Definition at line 1451 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), k, and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::search().
| TEST | ( | DynMapHashTable | , |
| EmptyMapProperties | |||
| ) |
Definition at line 602 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::search().
| TEST | ( | DynMapHashTable | , |
| FindByKey | |||
| ) |
Definition at line 667 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| InsertMultiplePairs | |||
| ) |
Definition at line 623 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::contains(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| InsertPair | |||
| ) |
Definition at line 612 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| InsertRejectsDuplicateKeys | |||
| ) |
Definition at line 637 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| ItemsPtr | |||
| ) |
Definition at line 821 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::items_ptr().
| TEST | ( | DynMapHashTable | , |
| Keys | |||
| ) |
Definition at line 755 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), k, Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::keys(), keys, and Aleph::sort().
| TEST | ( | DynMapHashTable | , |
| MoveSemantics | |||
| ) |
Definition at line 832 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and k.
| TEST | ( | DynMapHashTable | , |
| OperatorBracketConstThrows | |||
| ) |
Definition at line 727 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| OperatorBracketInsert | |||
| ) |
Definition at line 712 of file dynsethash.cc.
| TEST | ( | DynMapHashTable | , |
| RemoveByKey | |||
| ) |
Definition at line 737 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::clear(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::contains(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::remove().
| TEST | ( | DynMapHashTable | , |
| SearchByKey | |||
| ) |
Definition at line 652 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::search().
| TEST | ( | DynMapHashTable | , |
| SearchWithoutDefaultConstructibleData | |||
| ) |
Definition at line 690 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::search().
| TEST | ( | DynMapHashTable | , |
| Values | |||
| ) |
Definition at line 776 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), Aleph::sort(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::values().
| TEST | ( | DynMapHashTable | , |
| ValuesPtr | |||
| ) |
| TEST | ( | DynSetLhashMove | , |
| ATableWithoutListsIsATableLikeAnyOther | |||
| ) |
Definition at line 1404 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::copy(), Primes::DefaultPrime, Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty().
| TEST | ( | DynSetLhashMove | , |
| TakesTheListsAndLeavesAUsableTableWithoutThem | |||
| ) |
Definition at line 1290 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Primes::DefaultPrime, Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynSetLhashMove | , |
| TheTableThatWasMovedFromKeepsItsFunctionAndItsPolicy | |||
| ) |
Definition at line 1352 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), and Primes::DefaultPrime.
| TEST | ( | DynSetLhashMove | , |
| TheTableThatWasMovedFromKeepsItsLoadThresholds | |||
| ) |
Definition at line 1381 of file dynsethash.cc.
References Primes::DefaultPrime, and Aleph::hash_default_upper_alpha.