|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
One battery of tests for every binary search tree of the library. More...
#include "search_trees_test_common.H"#include <algorithm>#include <iterator>#include <numeric>#include <optional>#include <random>#include <set>#include <sstream>#include <stdexcept>#include <utility>Go to the source code of this file.
Concepts | |
| concept | @1065::Sized_Tree |
| concept | @1065::Ranked_Tree |
| concept | @1065::Removes_By_Position |
Functions | |
| TYPED_TEST (SearchTreeBattery, EveryInsertionOrderOfUpToEightKeys) | |
| TYPED_TEST (SearchTreeBattery, EveryOrderOfSearchOrInsertOfUpToSevenKeys) | |
| TYPED_TEST (SearchTreeBattery, EveryRemovalOrderFromEveryTreeOfUpToSixKeys) | |
| TYPED_TEST (SearchTreeBattery, EveryRemovalOrderOfSevenKeysFromGivenTrees) | |
| TYPED_TEST (SearchTreeBattery, RandomOperationsOnFewKeys) | |
| TYPED_TEST (SearchTreeBattery, RandomOperationsOnManyKeys) | |
| TYPED_TEST (SearchTreeBattery, RandomOperationsWithRepeatedKeys) | |
| TYPED_TEST (SearchTreeBattery, AdverseInsertionAndRemovalOrders) | |
| TYPED_TEST (SearchTreeBattery, LongAscendingAndDescendingRuns) | |
| TYPED_TEST (SearchTreeBattery, ManyNodesWithTheSameKey) | |
| TYPED_TEST (SearchTreeBattery, FewKeysRepeatedManyTimes) | |
| TYPED_TEST (PositionalRemovalBattery, EverySequenceOfPositionsOfUpToSevenKeys) | |
| TYPED_TEST (PositionalRemovalBattery, RemovePosBeyondTheLastKeyThrows) | |
| TYPED_TEST (RankedTreeBattery, SelectBeyondTheLastKeyThrows) | |
One battery of tests for every binary search tree of the library.
Each tree runs next to a std::multiset that says what it must hold. After every operation the tree must pass its own verify() (the order of the keys and the invariant of its type: AVL balance, red-black colors, heap of priorities, subtree counters) and its keys in order must be the ones of the multiset. Where it applies, size(), search(), select() and position() are compared too, and the height is bounded by what the invariant guarantees, which does not depend on verify() being right.
The sequences of operations are:
Definition in file search_trees_battery_test.cc.
| TYPED_TEST | ( | PositionalRemovalBattery | , |
| EverySequenceOfPositionsOfUpToSevenKeys | |||
| ) |
Definition at line 875 of file search_trees_battery_test.cc.
References Aleph::and, and seed.
| TYPED_TEST | ( | PositionalRemovalBattery | , |
| RemovePosBeyondTheLastKeyThrows | |||
| ) |
Definition at line 910 of file search_trees_battery_test.cc.
References KEY, and search_trees_test::Node_Pool< Node >::make().
| TYPED_TEST | ( | RankedTreeBattery | , |
| SelectBeyondTheLastKeyThrows | |||
| ) |
Definition at line 929 of file search_trees_battery_test.cc.
References KEY, and search_trees_test::Node_Pool< Node >::make().
| TYPED_TEST | ( | SearchTreeBattery | , |
| AdverseInsertionAndRemovalOrders | |||
| ) |
Definition at line 774 of file search_trees_battery_test.cc.
References seed.
| TYPED_TEST | ( | SearchTreeBattery | , |
| EveryInsertionOrderOfUpToEightKeys | |||
| ) |
Definition at line 546 of file search_trees_battery_test.cc.
References Aleph::to_string().
| TYPED_TEST | ( | SearchTreeBattery | , |
| EveryOrderOfSearchOrInsertOfUpToSevenKeys | |||
| ) |
Definition at line 576 of file search_trees_battery_test.cc.
References Aleph::to_string().
| TYPED_TEST | ( | SearchTreeBattery | , |
| EveryRemovalOrderFromEveryTreeOfUpToSixKeys | |||
| ) |
Definition at line 608 of file search_trees_battery_test.cc.
References seed, and Aleph::to_string().
| TYPED_TEST | ( | SearchTreeBattery | , |
| EveryRemovalOrderOfSevenKeysFromGivenTrees | |||
| ) |
Definition at line 653 of file search_trees_battery_test.cc.
References seed, and Aleph::to_string().
| TYPED_TEST | ( | SearchTreeBattery | , |
| FewKeysRepeatedManyTimes | |||
| ) |
Definition at line 844 of file search_trees_battery_test.cc.
References seed.
| TYPED_TEST | ( | SearchTreeBattery | , |
| LongAscendingAndDescendingRuns | |||
| ) |
Definition at line 792 of file search_trees_battery_test.cc.
| TYPED_TEST | ( | SearchTreeBattery | , |
| ManyNodesWithTheSameKey | |||
| ) |
Definition at line 822 of file search_trees_battery_test.cc.
| TYPED_TEST | ( | SearchTreeBattery | , |
| RandomOperationsOnFewKeys | |||
| ) |
Definition at line 750 of file search_trees_battery_test.cc.
References seed.
| TYPED_TEST | ( | SearchTreeBattery | , |
| RandomOperationsOnManyKeys | |||
| ) |
Definition at line 756 of file search_trees_battery_test.cc.
References seed.
| TYPED_TEST | ( | SearchTreeBattery | , |
| RandomOperationsWithRepeatedKeys | |||
| ) |
Definition at line 763 of file search_trees_battery_test.cc.
References seed.