|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Olhash. More...
#include <gtest/gtest.h>#include <numeric>#include <random>#include <set>#include <tpl_olhash.H>Go to the source code of this file.
Classes | |
| struct | MyRecord |
| struct | MyRecord::Eq |
| struct | BucketStats |
Functions | |
| TEST (OLhashTable, Simplest) | |
| size_t | my_hash (const MyRecord &r) noexcept |
| TEST (OLhashTable, Map) | |
| TEST (OLhashTable, KeyToBucketRoundTrip) | |
| TEST (OLhashTable, RemoveNonExistentKeyPreservesTableIntegrity) | |
| TEST (OLhashTable, RemoveWithExternalKey) | |
| TEST (OLhashTable, RemoveWithInternalKey) | |
| TEST (OLhashTable, ManyCollisions) | |
| TEST (OLhashTable, RemoveNonExistentDoesNotChangeCapacity) | |
| TEST (OLhashTable, Fuzz_RandomOperationsWithOracle) | |
| TEST (OLhashTable, Stress_FillAndEmpty) | |
| TEST (OLhashTable, Stress_LinearProbingCollisions) | |
| TEST (OLhashTable, Stress_InsertRemoveCycles) | |
| TEST (OLhashTable, Stress_ResizeOperations) | |
| TEST (OLhashTable, Fuzz_InterleavedOperations) | |
| TEST (OLhashTable, Stress_WithAutoResize) | |
| template<typename HashTable > | |
| BucketStats | count_bucket_states (const HashTable &tbl) |
| TEST (OLhashTable, DeletedCleanup_LastInChainBecomesEmpty) | |
| TEST (OLhashTable, DeletedCleanup_BackwardPropagation) | |
| TEST (OLhashTable, DeletedCleanup_MiddleStaysDeleted) | |
| TEST (OLhashTable, DeletedCleanup_NoAccumulationAfterCycles) | |
| TEST (OLhashTable, DeletedCleanup_WrapAround) | |
| TEST (OLhashTable, DeletedCleanup_StressNoAccumulation) | |
| TEST (OLhashTable, CopyConstructor) | |
| TEST (OLhashTable, MoveConstructor) | |
| TEST (OLhashTable, CopyAssignment) | |
| TEST (OLhashTable, MoveAssignment) | |
| TEST (OLhashTable, SelfAssignment) | |
| TEST (OLhashTable, DeletedSlotReuse) | |
| TEST (OLhashTable, SearchOrInsert_NewKey) | |
| TEST (OLhashTable, SearchOrInsert_ExistingKey) | |
| TEST (OLhashTable, ContainsOrInsert_NewKey) | |
| TEST (OLhashTable, ContainsOrInsert_ExistingKey) | |
| TEST (OLhashTable, ManualRehash) | |
| TEST (OLhashTable, ResizeUp) | |
| TEST (OLhashTable, ResizeDown) | |
| TEST (OLhashTable, EmptyTableOperations) | |
| TEST (OLhashTable, SingleElement) | |
| TEST (OLhashTable, DuplicateInsertReturnsNull) | |
| TEST (OLhashTable, HasAndContains) | |
| TEST (OLhashTable, Find) | |
| TEST (OLhashTable, IteratorBasic) | |
| TEST (OLhashTable, IteratorEmpty) | |
| TEST (OLhashTable, IteratorSingleElement) | |
| TEST (OLhashTable, IteratorDelete) | |
| TEST (OLhashTable, StatsCorrectness) | |
| TEST (OLhashTable, ForEach) | |
| TEST (OLhashTable, All) | |
| TEST (OLhashTable, Exists) | |
| TEST (OLhashTable, Filter) | |
Tests for Olhash.
Definition in file olhash.cc.
| BucketStats count_bucket_states | ( | const HashTable & | tbl | ) |
Definition at line 602 of file olhash.cc.
References BucketStats::busy, BucketStats::deleted, BucketStats::empty, and tbl.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
Definition at line 104 of file olhash.cc.
References Aleph::dft_hash_fct(), and r.
Referenced by TEST().
| TEST | ( | OLhashTable | , |
| All | |||
| ) |
Definition at line 1237 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| ContainsOrInsert_ExistingKey | |||
| ) |
Definition at line 981 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| ContainsOrInsert_NewKey | |||
| ) |
Definition at line 970 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| CopyAssignment | |||
| ) |
Definition at line 859 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::copy().
| TEST | ( | OLhashTable | , |
| CopyConstructor | |||
| ) |
Definition at line 816 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::copy().
| TEST | ( | OLhashTable | , |
| DeletedCleanup_BackwardPropagation | |||
| ) |
Definition at line 649 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), and tbl.
| TEST | ( | OLhashTable | , |
| DeletedCleanup_LastInChainBecomesEmpty | |||
| ) |
Definition at line 618 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), and tbl.
| TEST | ( | OLhashTable | , |
| DeletedCleanup_MiddleStaysDeleted | |||
| ) |
Definition at line 684 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), and tbl.
| TEST | ( | OLhashTable | , |
| DeletedCleanup_NoAccumulationAfterCycles | |||
| ) |
Definition at line 711 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), and tbl.
| TEST | ( | OLhashTable | , |
| DeletedCleanup_StressNoAccumulation | |||
| ) |
Definition at line 769 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), rng, and tbl.
| TEST | ( | OLhashTable | , |
| DeletedCleanup_WrapAround | |||
| ) |
Definition at line 738 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), k, and tbl.
| TEST | ( | OLhashTable | , |
| DeletedSlotReuse | |||
| ) |
Definition at line 914 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), and tbl.
| TEST | ( | OLhashTable | , |
| DuplicateInsertReturnsNull | |||
| ) |
Definition at line 1097 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| EmptyTableOperations | |||
| ) |
Definition at line 1067 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| Exists | |||
| ) |
Definition at line 1247 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| Filter | |||
| ) |
Definition at line 1257 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| Find | |||
| ) |
Definition at line 1125 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| ForEach | |||
| ) |
Definition at line 1225 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::sum(), and tbl.
| TEST | ( | OLhashTable | , |
| Fuzz_InterleavedOperations | |||
| ) |
| TEST | ( | OLhashTable | , |
| Fuzz_RandomOperationsWithOracle | |||
| ) |
| TEST | ( | OLhashTable | , |
| HasAndContains | |||
| ) |
Definition at line 1110 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| IteratorBasic | |||
| ) |
Definition at line 1142 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| IteratorDelete | |||
| ) |
Definition at line 1181 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| IteratorEmpty | |||
| ) |
Definition at line 1160 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| IteratorSingleElement | |||
| ) |
Definition at line 1168 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| KeyToBucketRoundTrip | |||
| ) |
Definition at line 138 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), and tbl.
| TEST | ( | OLhashTable | , |
| ManualRehash | |||
| ) |
Definition at line 997 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), and tbl.
| TEST | ( | OLhashTable | , |
| ManyCollisions | |||
| ) |
Definition at line 244 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| Map | |||
| ) |
Definition at line 109 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), my_hash(), tbl, and Aleph::to_string().
| TEST | ( | OLhashTable | , |
| MoveAssignment | |||
| ) |
Definition at line 878 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), OhashCommon< HashTbl, Key >::insert(), Aleph::OLhashTable< Key, Cmp >::search(), and OhashCommon< HashTbl, Key >::size().
| TEST | ( | OLhashTable | , |
| MoveConstructor | |||
| ) |
Definition at line 840 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | OLhashTable | , |
| RemoveNonExistentDoesNotChangeCapacity | |||
| ) |
Definition at line 278 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| RemoveNonExistentKeyPreservesTableIntegrity | |||
| ) |
Definition at line 154 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| RemoveWithExternalKey | |||
| ) |
Definition at line 200 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| RemoveWithInternalKey | |||
| ) |
Definition at line 225 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| ResizeDown | |||
| ) |
Definition at line 1048 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| ResizeUp | |||
| ) |
Definition at line 1031 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| SearchOrInsert_ExistingKey | |||
| ) |
Definition at line 959 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| SearchOrInsert_NewKey | |||
| ) |
Definition at line 949 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| SelfAssignment | |||
| ) |
Definition at line 897 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| Simplest | |||
| ) |
Definition at line 49 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| SingleElement | |||
| ) |
Definition at line 1079 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), count_bucket_states(), and tbl.
| TEST | ( | OLhashTable | , |
| StatsCorrectness | |||
| ) |
Definition at line 1200 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| Stress_FillAndEmpty | |||
| ) |
Definition at line 388 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::iota(), keys, rng, Aleph::shuffle(), and tbl.
| TEST | ( | OLhashTable | , |
| Stress_InsertRemoveCycles | |||
| ) |
Definition at line 458 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| Stress_LinearProbingCollisions | |||
| ) |
Definition at line 423 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), and tbl.
| TEST | ( | OLhashTable | , |
| Stress_ResizeOperations | |||
| ) |
Definition at line 486 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), rng, and tbl.
| TEST | ( | OLhashTable | , |
| Stress_WithAutoResize | |||
| ) |
Definition at line 563 of file olhash.cc.
References Aleph::blossom_maximum_cardinality_matching(), rng, and tbl.