|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Exhaustive tests for Pointer_Table class. More...
#include <gtest/gtest.h>#include <vector>#include <set>#include <random>#include <algorithm>#include <stdexcept>#include <pointer_table.H>Go to the source code of this file.
Classes | |
| class | PointerTableConstructionTest |
| class | PointerTableInsertTest |
| class | PointerTableRemoveTest |
| class | PointerTableRecyclingTest |
| class | PointerTableHeapContractionTest |
| class | PointerTableVerifyTest |
| class | PointerTableGetTest |
| class | PointerTableClearTest |
| class | PointerTableThresholdTest |
| class | PointerTableEdgeCasesTest |
| class | PointerTableStressTest |
| class | PointerTableConsistencyTest |
| class | PointerTableConstTest |
| class | PointerTableMemoryPatternTest |
| class | PointerTableRegressionTest |
Exhaustive tests for Pointer_Table class.
These tests cover all operations including edge cases and critical scenarios:
Definition in file pointer_table_test.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1112 of file pointer_table_test.cc.
References Aleph::maps().
| TEST | ( | PointerTableNullIndexTest | , |
| NullIndexIsNegative | |||
| ) |
Definition at line 938 of file pointer_table_test.cc.
References Aleph::maps(), and Pointer_Table::Null_Index.
| TEST_F | ( | PointerTableClearTest | , |
| ClearEmptyTable | |||
| ) |
Definition at line 558 of file pointer_table_test.cc.
References Pointer_Table::busies(), Pointer_Table::clear(), Pointer_Table::frees(), Pointer_Table::is_empty(), and Aleph::maps().
| TEST_F | ( | PointerTableClearTest | , |
| ClearNonEmptyTable | |||
| ) |
Definition at line 568 of file pointer_table_test.cc.
References Pointer_Table::busies(), Pointer_Table::clear(), Pointer_Table::frees(), Pointer_Table::get_heap_index(), Pointer_Table::insert_pointer(), Pointer_Table::is_empty(), and Aleph::maps().
| TEST_F | ( | PointerTableClearTest | , |
| ClearPreservesThreshold | |||
| ) |
Definition at line 583 of file pointer_table_test.cc.
References Pointer_Table::clear(), Pointer_Table::get_threshold(), Pointer_Table::insert_pointer(), Pointer_Table::is_empty(), and Aleph::maps().
| TEST_F | ( | PointerTableClearTest | , |
| ClearWithFreeEntries | |||
| ) |
Definition at line 595 of file pointer_table_test.cc.
References Pointer_Table::clear(), Pointer_Table::frees(), Pointer_Table::insert_pointer(), Pointer_Table::is_empty(), Aleph::maps(), and Pointer_Table::remove_pointer().
| TEST_F | ( | PointerTableConsistencyTest | , |
| CountsRemainConsistent | |||
| ) |
Definition at line 883 of file pointer_table_test.cc.
References Aleph::DynList< T >::empty(), Aleph::DynList< T >::insert(), Aleph::maps(), and Aleph::HTList::size().
| TEST_F | ( | PointerTableConsistencyTest | , |
| HeapIndexNeverExceedsBusiesPlusFrees | |||
| ) |
Definition at line 912 of file pointer_table_test.cc.
References StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), Aleph::maps(), and Aleph::shuffle().
| TEST_F | ( | PointerTableConstructionTest | , |
| ConstructorWithInitialSize | |||
| ) |
Definition at line 79 of file pointer_table_test.cc.
References Pointer_Table::busies(), Pointer_Table::frees(), Pointer_Table::get_heap_index(), Pointer_Table::get_threshold(), Pointer_Table::is_empty(), and Aleph::maps().
| TEST_F | ( | PointerTableConstructionTest | , |
| ConstructorWithLargeSize | |||
| ) |
Definition at line 98 of file pointer_table_test.cc.
References Pointer_Table::get_threshold(), Pointer_Table::is_empty(), and Aleph::maps().
| TEST_F | ( | PointerTableConstructionTest | , |
| ConstructorWithZeroSize | |||
| ) |
Definition at line 90 of file pointer_table_test.cc.
References Pointer_Table::get_threshold(), Pointer_Table::is_empty(), and Aleph::maps().
| TEST_F | ( | PointerTableConstructionTest | , |
| DefaultConstructor | |||
| ) |
Definition at line 67 of file pointer_table_test.cc.
References Pointer_Table::busies(), Pointer_Table::frees(), Pointer_Table::get_heap_index(), Pointer_Table::get_threshold(), Pointer_Table::is_empty(), Aleph::maps(), and Pointer_Table::size().
| TEST_F | ( | PointerTableConstTest | , |
| ConstMethodsWork | |||
| ) |
Definition at line 954 of file pointer_table_test.cc.
References Pointer_Table::busies(), Pointer_Table::frees(), Pointer_Table::get_heap_index(), Pointer_Table::get_threshold(), Pointer_Table::insert_pointer(), Aleph::HTList::is_empty(), Pointer_Table::is_empty(), Aleph::maps(), Aleph::HTList::size(), and Pointer_Table::size().
| TEST_F | ( | PointerTableEdgeCasesTest | , |
| AlternatingInsertRemove | |||
| ) |
Definition at line 673 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableEdgeCasesTest | , |
| RemoveInForwardOrder | |||
| ) |
Definition at line 708 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableEdgeCasesTest | , |
| RemoveInReverseOrder | |||
| ) |
Definition at line 686 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableEdgeCasesTest | , |
| RemoveOnlyElement | |||
| ) |
Definition at line 662 of file pointer_table_test.cc.
References Pointer_Table::insert_pointer(), and Aleph::maps().
| TEST_F | ( | PointerTableGetTest | , |
| GetFreedSlotReturnsNull | |||
| ) |
Definition at line 538 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableGetTest | , |
| GetInvalidIndexThrows | |||
| ) |
Definition at line 530 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableGetTest | , |
| GetMultiplePointers | |||
| ) |
Definition at line 519 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableGetTest | , |
| GetValidPointer | |||
| ) |
Definition at line 511 of file pointer_table_test.cc.
References Pointer_Table::insert_pointer(), and Aleph::maps().
| TEST_F | ( | PointerTableHeapContractionTest | , |
| BasicHeapContraction | |||
| ) |
Definition at line 352 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableHeapContractionTest | , |
| ContractionAfterRemovingConsecutive | |||
| ) |
Definition at line 432 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableHeapContractionTest | , |
| HeapContractionWithFreeTableCleanup | |||
| ) |
Definition at line 368 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableHeapContractionTest | , |
| MultipleContractionLevels | |||
| ) |
Definition at line 406 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableInsertTest | , |
| InsertManyPointers | |||
| ) |
Definition at line 149 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableInsertTest | , |
| InsertMultiplePointers | |||
| ) |
Definition at line 127 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableInsertTest | , |
| InsertSamePointerTwice | |||
| ) |
Definition at line 140 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableInsertTest | , |
| InsertSinglePointer | |||
| ) |
Definition at line 117 of file pointer_table_test.cc.
References Pointer_Table::insert_pointer(), and Aleph::maps().
| TEST_F | ( | PointerTableMemoryPatternTest | , |
| FragmentedPattern | |||
| ) |
Definition at line 1010 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableMemoryPatternTest | , |
| SawtoothPattern | |||
| ) |
Definition at line 982 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRecyclingTest | , |
| RecyclesBeforeGrowingHeap | |||
| ) |
Definition at line 309 of file pointer_table_test.cc.
References Aleph::DynList< T >::insert(), and Aleph::maps().
| TEST_F | ( | PointerTableRecyclingTest | , |
| RecyclesMultipleIndices | |||
| ) |
Definition at line 292 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRecyclingTest | , |
| RecyclesSingleIndex | |||
| ) |
Definition at line 278 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRegressionTest | , |
| BugFix_CompleteContractionCleansAllFree | |||
| ) |
Definition at line 1084 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRegressionTest | , |
| BugFix_FreeTableNotCleanedOnContraction | |||
| ) |
Definition at line 1048 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRemoveTest | , |
| RemoveAllPointers | |||
| ) |
Definition at line 233 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRemoveTest | , |
| RemoveAlreadyFreeIndexThrows | |||
| ) |
Definition at line 258 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRemoveTest | , |
| RemoveFromBeginning | |||
| ) |
Definition at line 218 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRemoveTest | , |
| RemoveFromEnd | |||
| ) |
Definition at line 203 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRemoveTest | , |
| RemoveFromMiddle | |||
| ) |
Definition at line 188 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRemoveTest | , |
| RemoveInvalidIndexThrows | |||
| ) |
Definition at line 249 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableRemoveTest | , |
| RemoveSinglePointer | |||
| ) |
Definition at line 178 of file pointer_table_test.cc.
References Pointer_Table::insert_pointer(), and Aleph::maps().
| TEST_F | ( | PointerTableStressTest | , |
| HeapContractionStress | |||
| ) |
Definition at line 841 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableStressTest | , |
| InterleavedPatterns | |||
| ) |
Definition at line 788 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableStressTest | , |
| MassiveGrowthAndShrink | |||
| ) |
Definition at line 818 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableStressTest | , |
| RandomOperations | |||
| ) |
Definition at line 743 of file pointer_table_test.cc.
References StlAlephIterator< SetName >::begin(), Aleph::DynList< T >::empty(), Aleph::DynList< T >::insert(), Aleph::maps(), rng, and Aleph::HTList::size().
| TEST_F | ( | PointerTableThresholdTest | , |
| DoesNotShrinkBelowThreshold | |||
| ) |
Definition at line 621 of file pointer_table_test.cc.
References Pointer_Table::get_threshold(), Pointer_Table::insert_pointer(), Aleph::maps(), Pointer_Table::remove_pointer(), and Pointer_Table::size().
| TEST_F | ( | PointerTableThresholdTest | , |
| ZeroThresholdAllowsFullShrink | |||
| ) |
Definition at line 637 of file pointer_table_test.cc.
References Pointer_Table::get_heap_index(), Pointer_Table::insert_pointer(), Pointer_Table::is_empty(), Aleph::maps(), and Pointer_Table::remove_pointer().
| TEST_F | ( | PointerTableVerifyTest | , |
| VerifyAfterRemoveThrows | |||
| ) |
Definition at line 490 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableVerifyTest | , |
| VerifyCorrectPointer | |||
| ) |
Definition at line 467 of file pointer_table_test.cc.
References Pointer_Table::insert_pointer(), and Aleph::maps().
| TEST_F | ( | PointerTableVerifyTest | , |
| VerifyIncorrectPointerThrows | |||
| ) |
Definition at line 475 of file pointer_table_test.cc.
References Aleph::maps().
| TEST_F | ( | PointerTableVerifyTest | , |
| VerifyInvalidIndexThrows | |||
| ) |
Definition at line 482 of file pointer_table_test.cc.
References Aleph::maps().