|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Hash It. More...
#include <gtest/gtest.h>#include <ahFunctional.H>#include <ahSort.H>#include <tpl_dynMapOhash.H>#include <tpl_dynSetHash.H>#include <tpl_olhash.H>#include <tpl_odhash.H>#include <tpl_lhash.H>#include <stdexcept>#include <functional>Go to the source code of this file.
Classes | |
| struct | OHashTest< HashTbl > |
| struct | EmptyOHashTest< HashTbl > |
Typedefs | |
| using | P = pair< size_t, string > |
| using | HashTypes = Types< MapODhash< size_t, string >, MapOLhash< size_t, string >, DynMapLinHash< size_t, string >, DynMapHash< size_t, string > > |
Functions | |
| TYPED_TEST_CASE_P (OHashTest) | |
| TYPED_TEST_CASE_P (EmptyOHashTest) | |
| TYPED_TEST_P (EmptyOHashTest, With_exception) | |
| TYPED_TEST_P (OHashTest, Without_exception) | |
| REGISTER_TYPED_TEST_CASE_P (EmptyOHashTest, With_exception) | |
| REGISTER_TYPED_TEST_CASE_P (OHashTest, Without_exception) | |
| INSTANTIATE_TYPED_TEST_CASE_P (Empty, EmptyOHashTest, HashTypes) | |
| INSTANTIATE_TYPED_TEST_CASE_P (NoEmpty, OHashTest, HashTypes) | |
| TEST (OLhashTable, DoubleHashCtorAndOps) | |
| TEST (OLhashTable, KeyToBucketRoundTrip) | |
| TEST (OLhashTable, RemoveThrowsOnMissingKey) | |
| TEST (OLhashTable, InsertRejectsDuplicate) | |
| TEST (OLhashTable, RemovePtrMarksDeleted) | |
| TEST (OLhashTable, NoResizeFillAndSearchMiss) | |
| TEST (OLhashTable, StatsWithDeletedAndBusy) | |
| TEST (OLhashTable, RehashKeepsElements) | |
| TEST (OLhashTable, ConstantHashCollisionsNoResize) | |
| TEST (OLhashTable, RehashAfterDeletesPreservesLiveKeys) | |
| TEST (OLhashTable, SearchOrInsertBehavior) | |
| TEST (OLhashTable, CopyMoveAndSwap) | |
| TEST (OLhashTable, StatsExtremes) | |
| TEST (OLhashTable, CleanTableLeavesEmpty) | |
| TEST (OLhashTable, InsertFailsWhenFullNoResize) | |
| TEST (OLhashTable, ResizeIncreasesCapacity) | |
| TEST (OLhashTable, DeletedSlotIsReused) | |
| TEST (ODhashTable, RemoveMissingInFullTableDoesNotHang) | |
| TEST (ODhashTable, DuplicateInsertAndSearchOrInsert) | |
| TEST (ODhashTable, CopyMoveAssignAndSwap) | |
| TEST (ODhashTable, StatsWithBusyDeletedEmpty) | |
| TEST (ODhashTable, CustomSecondHashSetter) | |
| TEST (ODhashTable, StatsAvgVarFinite) | |
| TEST (ODhashTable, StatsControlledProbes) | |
| TEST (ODhashTable, RehashWithResizeKeepsElements) | |
| TEST (ODhashTable, LinearProbePathCovered) | |
| TEST (ODhashTable, IteratorCollectsAllKeys) | |
| TEST (LhashTable, BusySlotsAfterLastRemoval) | |
| TEST (LhashTable, ShrinksWhenLoadFallsBelowLowerAlpha) | |
| TEST (LhashTable, IteratorDelRemovesAllCollidingBuckets) | |
| TEST (LhashTable, SearchOrInsertReturnsExisting) | |
| TEST (LhashTable, MoveSemanticsPreserveContent) | |
| TEST (LhashTable, InsertRejectsDuplicateAndSearchFinds) | |
| TEST (LhashTable, SearchNextReturnsNullWhenNoDuplicateKey) | |
| TEST (LhashTable, IteratorBoundsThrow) | |
| TEST (LhashTable, EmptyResetsCountersAndBuckets) | |
| TEST (LhashTable, RemoveAllBucketsFalseKeepsOwnership) | |
| TEST (LhashTable, SwapExchangesState) | |
| TEST (LhashTable, SetHashFunctionChangesDistribution) | |
| TEST (LhashTable, NoResizeModeKeepsCapacity) | |
| TEST (LhashTable, CustomComparatorActsAsEquality) | |
| TEST (LhashTable, CurrentAlphaNonZero) | |
Variables | |
| constexpr size_t | N = 1000 |
Tests for Hash It.
Definition in file hash-it.cc.
| using HashTypes = Types<MapODhash<size_t, string>, MapOLhash<size_t, string>, DynMapLinHash<size_t, string>, DynMapHash<size_t, string> > |
Definition at line 123 of file hash-it.cc.
Definition at line 53 of file hash-it.cc.
| INSTANTIATE_TYPED_TEST_CASE_P | ( | Empty | , |
| EmptyOHashTest | , | ||
| HashTypes | |||
| ) |
| REGISTER_TYPED_TEST_CASE_P | ( | EmptyOHashTest | , |
| With_exception | |||
| ) |
| REGISTER_TYPED_TEST_CASE_P | ( | OHashTest | , |
| Without_exception | |||
| ) |
| TEST | ( | LhashTable | , |
| BusySlotsAfterLastRemoval | |||
| ) |
Definition at line 567 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), Aleph::DynList< T >::remove(), and tbl.
| TEST | ( | LhashTable | , |
| CurrentAlphaNonZero | |||
| ) |
Definition at line 861 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| CustomComparatorActsAsEquality | |||
| ) |
Definition at line 839 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| EmptyResetsCountersAndBuckets | |||
| ) |
Definition at line 737 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::Dlink::insert(), Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| InsertRejectsDuplicateAndSearchFinds | |||
| ) |
Definition at line 670 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| IteratorBoundsThrow | |||
| ) |
Definition at line 712 of file hash-it.cc.
References Aleph::Dlink::insert(), Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| IteratorDelRemovesAllCollidingBuckets | |||
| ) |
Definition at line 615 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| MoveSemanticsPreserveContent | |||
| ) |
Definition at line 651 of file hash-it.cc.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::insert(), Aleph::GenLhashTable< Key, BucketType, Cmp >::is_empty(), Aleph::maps(), Aleph::DynList< T >::remove(), and Aleph::HTList::size().
| TEST | ( | LhashTable | , |
| NoResizeModeKeepsCapacity | |||
| ) |
Definition at line 823 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::Dlink::insert(), Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| RemoveAllBucketsFalseKeepsOwnership | |||
| ) |
Definition at line 753 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| SearchNextReturnsNullWhenNoDuplicateKey | |||
| ) |
Definition at line 689 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| SearchOrInsertReturnsExisting | |||
| ) |
Definition at line 635 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| SetHashFunctionChangesDistribution | |||
| ) |
Definition at line 801 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | LhashTable | , |
| ShrinksWhenLoadFallsBelowLowerAlpha | |||
| ) |
Definition at line 589 of file hash-it.cc.
References Aleph::maps(), Aleph::DynList< T >::remove(), and tbl.
| TEST | ( | LhashTable | , |
| SwapExchangesState | |||
| ) |
Definition at line 769 of file hash-it.cc.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::capacity(), Aleph::GenLhashTable< Key, BucketType, Cmp >::insert(), Aleph::maps(), Aleph::GenLhashTable< Key, BucketType, Cmp >::remove(), Aleph::GenLhashTable< Key, BucketType, Cmp >::search(), Aleph::GenLhashTable< Key, BucketType, Cmp >::size(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::swap().
| TEST | ( | ODhashTable | , |
| CopyMoveAssignAndSwap | |||
| ) |
Definition at line 443 of file hash-it.cc.
References OhashCommon< HashTbl, Key >::insert(), Aleph::maps(), Aleph::ODhashTable< Key, Cmp >::search(), OhashCommon< HashTbl, Key >::size(), and Aleph::ODhashTable< Key, Cmp >::swap().
| TEST | ( | ODhashTable | , |
| CustomSecondHashSetter | |||
| ) |
Definition at line 488 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | ODhashTable | , |
| DuplicateInsertAndSearchOrInsert | |||
| ) |
Definition at line 430 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | ODhashTable | , |
| IteratorCollectsAllKeys | |||
| ) |
Definition at line 547 of file hash-it.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), and tbl.
| TEST | ( | ODhashTable | , |
| LinearProbePathCovered | |||
| ) |
Definition at line 538 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | ODhashTable | , |
| RehashWithResizeKeepsElements | |||
| ) |
Definition at line 521 of file hash-it.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), and tbl.
| TEST | ( | ODhashTable | , |
| RemoveMissingInFullTableDoesNotHang | |||
| ) |
Definition at line 413 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | ODhashTable | , |
| StatsAvgVarFinite | |||
| ) |
Definition at line 497 of file hash-it.cc.
References OhashCommon< HashTbl, Key >::insert(), Aleph::maps(), and tbl.
| TEST | ( | ODhashTable | , |
| StatsControlledProbes | |||
| ) |
Definition at line 506 of file hash-it.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), and tbl.
| TEST | ( | ODhashTable | , |
| StatsWithBusyDeletedEmpty | |||
| ) |
Definition at line 474 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| CleanTableLeavesEmpty | |||
| ) |
Definition at line 361 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| ConstantHashCollisionsNoResize | |||
| ) |
Definition at line 245 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| CopyMoveAndSwap | |||
| ) |
| TEST | ( | OLhashTable | , |
| DeletedSlotIsReused | |||
| ) |
Definition at line 399 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| DoubleHashCtorAndOps | |||
| ) |
Definition at line 135 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| InsertFailsWhenFullNoResize | |||
| ) |
Definition at line 371 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| InsertRejectsDuplicate | |||
| ) |
Definition at line 175 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| KeyToBucketRoundTrip | |||
| ) |
Definition at line 155 of file hash-it.cc.
References OhashCommon< HashTbl, Key >::insert(), Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| NoResizeFillAndSearchMiss | |||
| ) |
Definition at line 198 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| RehashAfterDeletesPreservesLiveKeys | |||
| ) |
Definition at line 261 of file hash-it.cc.
References Aleph::maps(), Aleph::DynList< T >::remove(), and tbl.
| TEST | ( | OLhashTable | , |
| RehashKeepsElements | |||
| ) |
Definition at line 229 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| RemovePtrMarksDeleted | |||
| ) |
Definition at line 186 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| RemoveThrowsOnMissingKey | |||
| ) |
Definition at line 168 of file hash-it.cc.
References OhashCommon< HashTbl, Key >::insert(), Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| ResizeIncreasesCapacity | |||
| ) |
Definition at line 382 of file hash-it.cc.
References Aleph::DynList< T >::insert(), Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| SearchOrInsertBehavior | |||
| ) |
Definition at line 285 of file hash-it.cc.
References Aleph::maps(), and tbl.
| TEST | ( | OLhashTable | , |
| StatsExtremes | |||
| ) |
Definition at line 341 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::DynList< T >::insert(), and Aleph::maps().
| TEST | ( | OLhashTable | , |
| StatsWithDeletedAndBusy | |||
| ) |
Definition at line 208 of file hash-it.cc.
References Aleph::hash_default_lower_alpha, Aleph::hash_default_upper_alpha, Aleph::maps(), and tbl.
| TYPED_TEST_CASE_P | ( | EmptyOHashTest | ) |
| TYPED_TEST_CASE_P | ( | OHashTest | ) |
| TYPED_TEST_P | ( | EmptyOHashTest | , |
| With_exception | |||
| ) |
Definition at line 82 of file hash-it.cc.
References LocateFunctions< Container, Type >::get_it(), Aleph::maps(), and tbl.
| TYPED_TEST_P | ( | OHashTest | , |
| Without_exception | |||
| ) |
Definition at line 91 of file hash-it.cc.
References Aleph::DynList< T >::append(), Aleph::DynList< T >::empty(), l, Aleph::maps(), FunctionalMethods< Container, T >::maps(), N, Aleph::sort(), and tbl.
|
constexpr |
Definition at line 55 of file hash-it.cc.
Referenced by TYPED_TEST_P().