|
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 |
| 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 1018 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp().
| size_t point_hash | ( | const Point & | p | ) |
Definition at line 992 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::divide_and_conquer_partition_dp().
| TEST | ( | DynHashTable | , |
| ContainsOrInsertBehavior | |||
| ) |
Definition at line 184 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains_or_insert(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | DynHashTable | , |
| CopyAssignment | |||
| ) |
Definition at line 336 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| CopyConstructor | |||
| ) |
Definition at line 317 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| CustomHashFunction | |||
| ) |
Definition at line 949 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), custom_hash(), Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and k.
| TEST | ( | DynHashTable | , |
| CustomType | |||
| ) |
Definition at line 997 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and point_hash().
| TEST | ( | DynHashTable | , |
| DynSetHashAlias | |||
| ) |
Definition at line 903 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| EmptyMethod | |||
| ) |
| TEST | ( | DynHashTable | , |
| EmptyTableProperties | |||
| ) |
Definition at line 53 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::has(), Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynHashTable | , |
| FindReturnsReference | |||
| ) |
Definition at line 134 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::find(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| FindThrowsIfNotFound | |||
| ) |
Definition at line 153 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::find(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| GetFirstAndLast | |||
| ) |
| TEST | ( | DynHashTable | , |
| InsertMultipleElements | |||
| ) |
Definition at line 77 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| InsertRejectsDuplicates | |||
| ) |
Definition at line 97 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| InsertRemoveRepeated | |||
| ) |
| TEST | ( | DynHashTable | , |
| InsertSingleElement | |||
| ) |
Definition at line 64 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::has(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty().
| TEST | ( | DynHashTable | , |
| IteratorDel | |||
| ) |
Definition at line 459 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| IteratorEmptyTable | |||
| ) |
Definition at line 432 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | DynHashTable | , |
| IteratorTraversal | |||
| ) |
Definition at line 440 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), keys, and Aleph::sort().
| TEST | ( | DynHashTable | , |
| LargeNumberOfInsertions | |||
| ) |
Definition at line 511 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| LinearHashTableBasics | |||
| ) |
Definition at line 891 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| ManyCollisions | |||
| ) |
Definition at line 526 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| MoveAssignment | |||
| ) |
Definition at line 385 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| MoveConstructor | |||
| ) |
Definition at line 369 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| MoveInsert | |||
| ) |
Definition at line 219 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| RandomInsertRemove | |||
| ) |
| TEST | ( | DynHashTable | , |
| RehashingBehavior | |||
| ) |
| TEST | ( | DynHashTable | , |
| RemoveAllElements | |||
| ) |
| TEST | ( | DynHashTable | , |
| RemoveByKey | |||
| ) |
| TEST | ( | DynHashTable | , |
| RemoveByPointer | |||
| ) |
| TEST | ( | DynHashTable | , |
| RemoveThrowsIfNotFound | |||
| ) |
Definition at line 250 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| SearchFindsExistingKey | |||
| ) |
Definition at line 111 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynHashTable | , |
| SearchOrInsertBehavior | |||
| ) |
Definition at line 166 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search_or_insert().
| TEST | ( | DynHashTable | , |
| SearchReturnsNullForMissingKey | |||
| ) |
Definition at line 124 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), and Aleph::DynHashTable< Key, HashTable, Cmp >::search().
| TEST | ( | DynHashTable | , |
| SelfAssignment | |||
| ) |
Definition at line 355 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| SingleElement | |||
| ) |
Definition at line 918 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), Aleph::DynHashTable< Key, HashTable, Cmp >::insert(), Aleph::DynHashTable< Key, HashTable, Cmp >::is_empty(), and Aleph::DynHashTable< Key, HashTable, Cmp >::remove().
| TEST | ( | DynHashTable | , |
| StringKeys | |||
| ) |
Definition at line 493 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTable | , |
| Swap | |||
| ) |
Definition at line 406 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynHashTable< Key, HashTable, Cmp >::insert().
| TEST | ( | DynHashTableFunctions | , |
| Intercept | |||
| ) |
Definition at line 809 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::intercept(), l1, l2, and Aleph::sort().
| TEST | ( | DynHashTableFunctions | , |
| Join | |||
| ) |
Definition at line 794 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::join(), l1, and l2.
| TEST | ( | DynHashTableFunctions | , |
| Repeated | |||
| ) |
Definition at line 841 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), l, and Aleph::repeated().
| TEST | ( | DynHashTableFunctions | , |
| RepeatedWithIndex | |||
| ) |
Definition at line 860 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), l, and Aleph::repeated_with_index().
| TEST | ( | DynHashTableFunctions | , |
| Unique | |||
| ) |
Definition at line 827 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), l, and Aleph::unique().
| TEST | ( | DynMapHashTable | , |
| DISABLED_Values | |||
| ) |
Definition at line 741 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | DynMapHashTable | , |
| EmptyMapProperties | |||
| ) |
| TEST | ( | DynMapHashTable | , |
| FindByKey | |||
| ) |
Definition at line 666 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| InsertMultiplePairs | |||
| ) |
Definition at line 622 of file dynsethash.cc.
References Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| InsertPair | |||
| ) |
Definition at line 611 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| InsertRejectsDuplicateKeys | |||
| ) |
Definition at line 636 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| ItemsPtr | |||
| ) |
Definition at line 766 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::items_ptr().
| TEST | ( | DynMapHashTable | , |
| Keys | |||
| ) |
Definition at line 719 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), 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 777 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::find(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and k.
| TEST | ( | DynMapHashTable | , |
| OperatorBracketConstThrows | |||
| ) |
Definition at line 691 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert().
| TEST | ( | DynMapHashTable | , |
| OperatorBracketInsert | |||
| ) |
Definition at line 676 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | DynMapHashTable | , |
| RemoveByKey | |||
| ) |
Definition at line 701 of file dynsethash.cc.
References Aleph::DynHashTable< Key, HashTable, Cmp >::clear(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::contains(), Aleph::divide_and_conquer_partition_dp(), 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 651 of file dynsethash.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::insert(), and Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::search().
| TEST | ( | DynMapHashTable | , |
| ValuesPtr | |||
| ) |