|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Comprehensive tests for DynLhashTable (dynamic hash table with chaining) More...
#include <gtest/gtest.h>#include <tpl_dynLhash.H>#include <string>#include <vector>#include <random>Go to the source code of this file.
Classes | |
| class | DynLhashTableTest |
| struct | ComplexValue |
Functions | |
| TEST_F (DynLhashTableTest, InsertAndSearch) | |
| TEST_F (DynLhashTableTest, SearchNonExistent) | |
| TEST_F (DynLhashTableTest, InsertMultiple) | |
| TEST_F (DynLhashTableTest, Remove) | |
| TEST_F (DynLhashTableTest, UpdateExisting) | |
| TEST_F (DynLhashTableTest, BracketOperatorInsert) | |
| TEST_F (DynLhashTableTest, BracketOperatorUpdate) | |
| TEST_F (DynLhashTableTest, BracketOperatorReadExisting) | |
| TEST_F (DynLhashTableTest, BracketOperatorReadNonExisting) | |
| TEST_F (DynLhashTableTest, CopyConstructor) | |
| TEST_F (DynLhashTableTest, CopyAssignment) | |
| TEST_F (DynLhashTableTest, MoveConstructor) | |
| TEST_F (DynLhashTableTest, MoveAssignment) | |
| TEST_F (DynLhashTableTest, SelfAssignment) | |
| TEST (DynLhashTableStringKey, BasicOperations) | |
| TEST (DynLhashTableStringKey, LongStrings) | |
| TEST (DynLhashTableCollision, SameHashBucket) | |
| TEST (DynLhashTableMoveValue, MoveInsert) | |
| TEST (DynLhashTableMoveValue, MoveKeyAndValue) | |
| TEST (DynLhashTableStress, ManyInsertions) | |
| TEST (DynLhashTableStress, ManyInsertionsAndRemovals) | |
| TEST (DynLhashTableStress, RandomOperations) | |
| TEST_F (DynLhashTableTest, EmptyTable) | |
| TEST_F (DynLhashTableTest, NegativeKeys) | |
| TEST_F (DynLhashTableTest, SameKeyMultipleInserts) | |
| size_t | custom_hash (const int &key) |
| TEST (DynLhashTableCustomHash, WithCustomHashFunction) | |
| TEST (DynLhashTableSwap, SwapTables) | |
| TEST (DynLhashTableSwap, SwapWithEmpty) | |
| TEST (DynLhashTablePostMove, MoveConstructorTransfersOwnership) | |
| TEST (DynLhashTablePostMove, MoveAssignmentTransfersOwnership) | |
| TEST (DynLhashTableComplexType, MoveSemanticsPropagated) | |
| TEST (DynLhashTableDuplicates, InsertDuplicateKeysAllowed) | |
| TEST (DynLhashTableDuplicates, RemoveOneDuplicate) | |
| TEST (DynLhashTableStress, LargeScaleWithVerification) | |
| TEST (DynLhashTableStress, InterleavedInsertRemove) | |
| int | main (int argc, char **argv) |
Comprehensive tests for DynLhashTable (dynamic hash table with chaining)
Definition in file tpl_dynLhash_test.cc.
| size_t custom_hash | ( | const int & | key | ) |
Definition at line 422 of file tpl_dynLhash_test.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 689 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST | ( | DynLhashTableCollision | , |
| SameHashBucket | |||
| ) |
Definition at line 246 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableComplexType | , |
| MoveSemanticsPropagated | |||
| ) |
Definition at line 560 of file tpl_dynLhash_test.cc.
References ComplexValue::copy_count, Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), ComplexValue::move_count, and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableCustomHash | , |
| WithCustomHashFunction | |||
| ) |
Definition at line 427 of file tpl_dynLhash_test.cc.
References custom_hash(), Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableDuplicates | , |
| InsertDuplicateKeysAllowed | |||
| ) |
Definition at line 583 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), and Aleph::DynLhashTable< Key, Record, Cmp >::remove().
| TEST | ( | DynLhashTableDuplicates | , |
| RemoveOneDuplicate | |||
| ) |
Definition at line 604 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), Aleph::DynLhashTable< Key, Record, Cmp >::remove(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableMoveValue | , |
| MoveInsert | |||
| ) |
Definition at line 264 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableMoveValue | , |
| MoveKeyAndValue | |||
| ) |
Definition at line 275 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTablePostMove | , |
| MoveAssignmentTransfersOwnership | |||
| ) |
Definition at line 496 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::DynList< T >::insert(), and Aleph::maps().
| TEST | ( | DynLhashTablePostMove | , |
| MoveConstructorTransfersOwnership | |||
| ) |
Definition at line 481 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), and Aleph::maps().
| TEST | ( | DynLhashTableStress | , |
| InterleavedInsertRemove | |||
| ) |
Definition at line 643 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), N, Aleph::DynLhashTable< Key, Record, Cmp >::remove(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableStress | , |
| LargeScaleWithVerification | |||
| ) |
Definition at line 625 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), N, and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableStress | , |
| ManyInsertions | |||
| ) |
Definition at line 290 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), N, and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableStress | , |
| ManyInsertionsAndRemovals | |||
| ) |
Definition at line 302 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), N, Aleph::DynLhashTable< Key, Record, Cmp >::remove(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableStress | , |
| RandomOperations | |||
| ) |
Definition at line 326 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), Aleph::DynLhashTable< Key, Record, Cmp >::remove(), rng, and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableStringKey | , |
| BasicOperations | |||
| ) |
Definition at line 218 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableStringKey | , |
| LongStrings | |||
| ) |
Definition at line 232 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), Aleph::maps(), and Aleph::DynLhashTable< Key, Record, Cmp >::search().
| TEST | ( | DynLhashTableSwap | , |
| SwapTables | |||
| ) |
Definition at line 442 of file tpl_dynLhash_test.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), and Aleph::DynList< T >::swap().
| TEST | ( | DynLhashTableSwap | , |
| SwapWithEmpty | |||
| ) |
Definition at line 464 of file tpl_dynLhash_test.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), and Aleph::DynList< T >::swap().
| TEST_F | ( | DynLhashTableTest | , |
| BracketOperatorInsert | |||
| ) |
Definition at line 113 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| BracketOperatorReadExisting | |||
| ) |
Definition at line 130 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| BracketOperatorReadNonExisting | |||
| ) |
Definition at line 138 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| BracketOperatorUpdate | |||
| ) |
Definition at line 122 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| CopyAssignment | |||
| ) |
Definition at line 167 of file tpl_dynLhash_test.cc.
References Aleph::DynList< T >::insert(), and Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| CopyConstructor | |||
| ) |
Definition at line 152 of file tpl_dynLhash_test.cc.
References Aleph::copy(), Aleph::DynList< T >::insert(), and Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| EmptyTable | |||
| ) |
Definition at line 384 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| InsertAndSearch | |||
| ) |
Definition at line 56 of file tpl_dynLhash_test.cc.
References Aleph::DynLhashTable< Key, Record, Cmp >::insert(), and Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| InsertMultiple | |||
| ) |
Definition at line 76 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| MoveAssignment | |||
| ) |
Definition at line 193 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| MoveConstructor | |||
| ) |
Definition at line 182 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| NegativeKeys | |||
| ) |
Definition at line 391 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| Remove | |||
| ) |
Definition at line 87 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| SameKeyMultipleInserts | |||
| ) |
Definition at line 402 of file tpl_dynLhash_test.cc.
References Aleph::DynList< T >::insert(), and Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| SearchNonExistent | |||
| ) |
Definition at line 68 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| SelfAssignment | |||
| ) |
Definition at line 205 of file tpl_dynLhash_test.cc.
References Aleph::maps().
| TEST_F | ( | DynLhashTableTest | , |
| UpdateExisting | |||
| ) |
Definition at line 98 of file tpl_dynLhash_test.cc.
References Aleph::maps().