|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Dynsethash. More...
#include <algorithm>#include <stdexcept>#include <vector>#include <string>#include <gtest/gtest.h>#include <tpl_dynSetHash.H>Go to the source code of this file.
Classes | |
| struct | Point |
| Rectangular point in the plane. More... | |
| 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, OperatorBracketInsert) | |
| TEST (DynMapHashTable, OperatorBracketConstThrows) | |
| TEST (DynMapHashTable, RemoveByKey) | |
| TEST (DynMapHashTable, Keys) | |
| TEST (DynMapHashTable, DISABLED_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) | |
| int | main (int argc, char **argv) |
Tests for Dynsethash.
Definition in file dynsethash.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1010 of file dynsethash.cc.
References Aleph::maps().
| size_t point_hash | ( | const Point & | p | ) |
Definition at line 984 of file dynsethash.cc.
Referenced by TEST().
| TEST | ( | DynHashTable | , |
| AddAndAppendAliases | |||
| ) |
Definition at line 204 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::add(), Aleph::DynHashTable< Key, HashTable, Cmp >::append(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| ContainsOrInsertBehavior | |||
| ) |
Definition at line 184 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains_or_insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| CopyAssignment | |||
| ) |
Definition at line 332 of file dynsethash.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), and Aleph::HTList::size().
| TEST | ( | DynHashTable | , |
| CopyConstructor | |||
| ) |
Definition at line 313 of file dynsethash.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), Aleph::DynList< T >::remove(), and Aleph::HTList::size().
| TEST | ( | DynHashTable | , |
| CustomHashFunction | |||
| ) |
Definition at line 941 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), custom_hash(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| CustomType | |||
| ) |
Definition at line 989 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and point_hash().
| TEST | ( | DynHashTable | , |
| DynSetHashAlias | |||
| ) |
Definition at line 895 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| EmptyMethod | |||
| ) |
Definition at line 294 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| EmptyTableProperties | |||
| ) |
Definition at line 53 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::has(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynHashTable | , |
| FindReturnsReference | |||
| ) |
Definition at line 134 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::find(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| FindThrowsIfNotFound | |||
| ) |
Definition at line 153 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::find(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| GetFirstAndLast | |||
| ) |
Definition at line 472 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::get_first(), Aleph::DynHashTable< Key, HashTable, Cmp >::get_last(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| InsertMultipleElements | |||
| ) |
Definition at line 77 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| InsertRejectsDuplicates | |||
| ) |
Definition at line 97 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| InsertRemoveRepeated | |||
| ) |
Definition at line 923 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| InsertSingleElement | |||
| ) |
Definition at line 64 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::has(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| IteratorDel | |||
| ) |
Definition at line 455 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| IteratorEmptyTable | |||
| ) |
Definition at line 428 of file dynsethash.cc.
References Aleph::maps().
| TEST | ( | DynHashTable | , |
| IteratorTraversal | |||
| ) |
Definition at line 436 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::sort().
| TEST | ( | DynHashTable | , |
| LargeNumberOfInsertions | |||
| ) |
Definition at line 507 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| LinearHashTableBasics | |||
| ) |
Definition at line 883 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| ManyCollisions | |||
| ) |
Definition at line 522 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| MoveAssignment | |||
| ) |
Definition at line 381 of file dynsethash.cc.
References Aleph::DynList< T >::insert(), Aleph::HTList::is_empty(), Aleph::maps(), and Aleph::HTList::size().
| TEST | ( | DynHashTable | , |
| MoveConstructor | |||
| ) |
Definition at line 365 of file dynsethash.cc.
References Aleph::DynList< T >::insert(), Aleph::HTList::is_empty(), Aleph::maps(), and Aleph::HTList::size().
| TEST | ( | DynHashTable | , |
| MoveInsert | |||
| ) |
Definition at line 219 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| RandomInsertRemove | |||
| ) |
Definition at line 538 of file dynsethash.cc.
References StlAlephIterator< SetName >::begin(), Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), Aleph::DynHashTable< Key, HashTable, Cmp >::remove(), and Aleph::HTList::size().
| TEST | ( | DynHashTable | , |
| RehashingBehavior | |||
| ) |
Definition at line 569 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RemoveAllElements | |||
| ) |
Definition at line 278 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RemoveByKey | |||
| ) |
Definition at line 234 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RemoveByPointer | |||
| ) |
Definition at line 259 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| RemoveThrowsIfNotFound | |||
| ) |
Definition at line 250 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| SearchFindsExistingKey | |||
| ) |
Definition at line 111 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynHashTable | , |
| SearchOrInsertBehavior | |||
| ) |
Definition at line 166 of file dynsethash.cc.
References Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search_or_insert().
| TEST | ( | DynHashTable | , |
| SearchReturnsNullForMissingKey | |||
| ) |
Definition at line 124 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynHashTable | , |
| SelfAssignment | |||
| ) |
Definition at line 351 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| SingleElement | |||
| ) |
Definition at line 910 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| StringKeys | |||
| ) |
Definition at line 489 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynHashTable | , |
| Swap | |||
| ) |
Definition at line 402 of file dynsethash.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), Aleph::HTList::size(), and Aleph::DynList< T >::swap().
| TEST | ( | DynHashTableFunctions | , |
| Intercept | |||
| ) |
Definition at line 801 of file dynsethash.cc.
References StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), FunctionalMethods< Container, T >::for_each(), Aleph::intercept(), Aleph::maps(), and Aleph::sort().
| TEST | ( | DynHashTableFunctions | , |
| Join | |||
| ) |
Definition at line 786 of file dynsethash.cc.
References Aleph::join(), and Aleph::maps().
| TEST | ( | DynHashTableFunctions | , |
| Repeated | |||
| ) |
Definition at line 833 of file dynsethash.cc.
References l, Aleph::maps(), and Aleph::repeated().
| TEST | ( | DynHashTableFunctions | , |
| RepeatedWithIndex | |||
| ) |
Definition at line 852 of file dynsethash.cc.
References FunctionalMethods< Container, T >::for_each(), l, Aleph::maps(), and Aleph::repeated_with_index().
| TEST | ( | DynHashTableFunctions | , |
| Unique | |||
| ) |
Definition at line 819 of file dynsethash.cc.
References l, Aleph::maps(), and Aleph::unique().
| TEST | ( | DynMapHashTable | , |
| DISABLED_Values | |||
| ) |
Definition at line 733 of file dynsethash.cc.
References Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| EmptyMapProperties | |||
| ) |
Definition at line 597 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::contains(), Aleph::maps(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::search().
| TEST | ( | DynMapHashTable | , |
| FindByKey | |||
| ) |
Definition at line 662 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| InsertMultiplePairs | |||
| ) |
Definition at line 618 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::contains(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| InsertPair | |||
| ) |
Definition at line 607 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| InsertRejectsDuplicateKeys | |||
| ) |
Definition at line 632 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| ItemsPtr | |||
| ) |
Definition at line 758 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::items_ptr(), and Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| Keys | |||
| ) |
Definition at line 711 of file dynsethash.cc.
References StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), FunctionalMethods< Container, T >::for_each(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::keys(), Aleph::maps(), and Aleph::sort().
| TEST | ( | DynMapHashTable | , |
| MoveSemantics | |||
| ) |
Definition at line 769 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| OperatorBracketConstThrows | |||
| ) |
Definition at line 687 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| OperatorBracketInsert | |||
| ) |
Definition at line 672 of file dynsethash.cc.
References Aleph::maps().
| TEST | ( | DynMapHashTable | , |
| RemoveByKey | |||
| ) |
| TEST | ( | DynMapHashTable | , |
| SearchByKey | |||
| ) |
Definition at line 647 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), Aleph::maps(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::search().
| TEST | ( | DynMapHashTable | , |
| ValuesPtr | |||
| ) |
Definition at line 739 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), FunctionalMethods< Container, T >::for_each(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), Aleph::maps(), Aleph::HTList::size(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::values_ptr().