|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Bin Node Xt. More...
#include <algorithm>#include <random>#include <set>#include <stdexcept>#include <vector>#include <gtest/gtest.h>#include <tpl_binNodeXt.H>#include <tpl_binNodeUtils.H>Go to the source code of this file.
Functions | |
| TEST (BinNodeXt, SplitKeyRecXtSplitsAndEmptiesRootWhenKeyAbsent) | |
| TEST (BinNodeXt, SplitKeyRecXtReturnsFalseWhenKeyPresentAndDoesNotCorrupt) | |
| TEST (BinNodeXt, SplitKeyDupRecXtSplitsAndEmptiesRoot) | |
| TEST (BinNodeXt, InsertRootXtMakesInsertedNodeRoot) | |
| TEST (BinNodeXt, InsertDupRootXtAllowsDuplicatesAndBecomesRoot) | |
| TEST (BinNodeXt, InsertByPosXtMaintainsRankButMayBreakBst) | |
| TEST (BinNodeXt, SearchOrInsertRootRecXtUsagePattern) | |
| TEST (BinNodeXt, ComparatorGreaterInsertFindRemove) | |
| TEST (BinNodeXt, OutOfRangeExceptions) | |
| TEST (BinNodeXt, SentinelCountIsZero) | |
| TEST (BinNodeXt, InsertByKeyMaintainsCountsAndBst) | |
| TEST (BinNodeXt, InsertRejectsDuplicates) | |
| TEST (BinNodeXt, InsertDupAllowsDuplicatesAndCounts) | |
| TEST (BinNodeXt, SearchOrInsertByKeyReturnsExistingOrInserted) | |
| TEST (BinNodeXt, SelectRecAndSelectNeAndSelectParent) | |
| TEST (BinNodeXt, InorderPositionReturnsRankOrMinusOne) | |
| TEST (BinNodeXt, FindPositionContract) | |
| TEST (BinNodeXt, SplitPosRecAndJoinExclusiveRoundtrip) | |
| TEST (BinNodeXt, RemoveByPosAndRemoveByKey) | |
| TEST (BinNodeXt, RotationsMaintainRankInvariant) | |
| TEST (BinNodeXt, Property_RandomInsertRemove_CountsAndOrder) | |
Tests for Bin Node Xt.
Definition in file bin-node-xt.cc.
| TEST | ( | BinNodeXt | , |
| ComparatorGreaterInsertFindRemove | |||
| ) |
Definition at line 256 of file bin-node-xt.cc.
References Aleph::check_rank_tree(), cmp(), inorder_keys(), KEY, Aleph::maps(), and root().
| TEST | ( | BinNodeXt | , |
| FindPositionContract | |||
| ) |
Definition at line 404 of file bin-node-xt.cc.
References Aleph::find_position(), Aleph::insert_by_key_xt(), KEY, Aleph::maps(), and root().
| TEST | ( | BinNodeXt | , |
| InorderPositionReturnsRankOrMinusOne | |||
| ) |
Definition at line 386 of file bin-node-xt.cc.
References Aleph::COUNT(), Aleph::inorder_position(), Aleph::insert_by_key_xt(), KEY, Aleph::maps(), root(), and Aleph::select().
| TEST | ( | BinNodeXt | , |
| InsertByKeyMaintainsCountsAndBst | |||
| ) |
Definition at line 304 of file bin-node-xt.cc.
References Aleph::COUNT(), inorder_keys(), Aleph::insert_by_key_xt(), Aleph::maps(), and root().
| TEST | ( | BinNodeXt | , |
| InsertByPosXtMaintainsRankButMayBreakBst | |||
| ) |
Definition at line 204 of file bin-node-xt.cc.
References StlAlephIterator< SetName >::begin(), Aleph::COUNT(), inorder_keys(), Aleph::DynList< T >::insert(), Aleph::insert_by_key_xt(), Aleph::insert_by_pos_xt(), KEY, Aleph::maps(), root(), and Aleph::select().
| TEST | ( | BinNodeXt | , |
| InsertDupAllowsDuplicatesAndCounts | |||
| ) |
Definition at line 332 of file bin-node-xt.cc.
References Aleph::COUNT(), Aleph::insert_dup_by_key_xt(), Aleph::maps(), and root().
| TEST | ( | BinNodeXt | , |
| InsertDupRootXtAllowsDuplicatesAndBecomesRoot | |||
| ) |
Definition at line 190 of file bin-node-xt.cc.
References inorder_keys(), Aleph::insert_by_key_xt(), Aleph::insert_dup_root_xt(), Aleph::maps(), and root().
| TEST | ( | BinNodeXt | , |
| InsertRejectsDuplicates | |||
| ) |
Definition at line 317 of file bin-node-xt.cc.
References Aleph::insert_by_key_xt(), Aleph::maps(), and root().
| TEST | ( | BinNodeXt | , |
| InsertRootXtMakesInsertedNodeRoot | |||
| ) |
Definition at line 171 of file bin-node-xt.cc.
References inorder_keys(), Aleph::insert_by_key_xt(), Aleph::insert_root_xt(), Aleph::maps(), and root().
| TEST | ( | BinNodeXt | , |
| OutOfRangeExceptions | |||
| ) |
Definition at line 283 of file bin-node-xt.cc.
References Aleph::COUNT(), Aleph::insert_by_key_xt(), Aleph::maps(), Aleph::remove_by_pos_xt(), root(), Aleph::select(), Aleph::select_rec(), and Aleph::split_pos_rec().
| TEST | ( | BinNodeXt | , |
| Property_RandomInsertRemove_CountsAndOrder | |||
| ) |
Definition at line 502 of file bin-node-xt.cc.
References StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), inorder_keys(), Aleph::DynList< T >::insert(), Aleph::insert_by_key_xt(), Aleph::maps(), Aleph::remove_by_key_xt(), rng, and root().
| TEST | ( | BinNodeXt | , |
| RemoveByPosAndRemoveByKey | |||
| ) |
Definition at line 455 of file bin-node-xt.cc.
References Aleph::COUNT(), inorder_keys(), Aleph::insert_by_key_xt(), KEY, Aleph::maps(), Aleph::remove_by_key_xt(), Aleph::remove_by_pos_xt(), and root().
| TEST | ( | BinNodeXt | , |
| RotationsMaintainRankInvariant | |||
| ) |
Definition at line 481 of file bin-node-xt.cc.
References Aleph::COUNT(), inorder_keys(), Aleph::LLINK(), Aleph::maps(), Aleph::RLINK(), Aleph::rotate_to_left_xt(), and Aleph::rotate_to_right_xt().
| TEST | ( | BinNodeXt | , |
| SearchOrInsertByKeyReturnsExistingOrInserted | |||
| ) |
Definition at line 345 of file bin-node-xt.cc.
References Aleph::COUNT(), KEY, Aleph::maps(), root(), and Aleph::search_or_insert_by_key_xt().
| TEST | ( | BinNodeXt | , |
| SearchOrInsertRootRecXtUsagePattern | |||
| ) |
Definition at line 231 of file bin-node-xt.cc.
References inorder_keys(), Aleph::insert_by_key_xt(), KEY, Aleph::maps(), and root().
| TEST | ( | BinNodeXt | , |
| SelectRecAndSelectNeAndSelectParent | |||
| ) |
Definition at line 363 of file bin-node-xt.cc.
References Aleph::COUNT(), Aleph::insert_by_key_xt(), KEY, Aleph::maps(), root(), Aleph::select(), Aleph::select_ne(), and Aleph::select_rec().
| TEST | ( | BinNodeXt | , |
| SentinelCountIsZero | |||
| ) |
Definition at line 299 of file bin-node-xt.cc.
References Aleph::COUNT(), and Aleph::maps().
| TEST | ( | BinNodeXt | , |
| SplitKeyDupRecXtSplitsAndEmptiesRoot | |||
| ) |
Definition at line 153 of file bin-node-xt.cc.
References inorder_keys(), Aleph::insert_dup_by_key_xt(), l, Aleph::maps(), root(), and Aleph::split_key_dup_rec_xt().
| TEST | ( | BinNodeXt | , |
| SplitKeyRecXtReturnsFalseWhenKeyPresentAndDoesNotCorrupt | |||
| ) |
Definition at line 138 of file bin-node-xt.cc.
References inorder_keys(), Aleph::insert_by_key_xt(), l, Aleph::maps(), root(), and Aleph::split_key_rec_xt().
| TEST | ( | BinNodeXt | , |
| SplitKeyRecXtSplitsAndEmptiesRootWhenKeyAbsent | |||
| ) |
Definition at line 120 of file bin-node-xt.cc.
References inorder_keys(), Aleph::insert_by_key_xt(), l, Aleph::maps(), root(), and Aleph::split_key_rec_xt().
| TEST | ( | BinNodeXt | , |
| SplitPosRecAndJoinExclusiveRoundtrip | |||
| ) |
Definition at line 430 of file bin-node-xt.cc.
References inorder_keys(), Aleph::insert_by_key_xt(), Aleph::join_exclusive_xt(), l, Aleph::maps(), root(), and Aleph::split_pos_rec().