Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
bin-node-xt.cc File Reference

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>
Include dependency graph for bin-node-xt.cc:

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)
 

Detailed Description

Tests for Bin Node Xt.

Definition in file bin-node-xt.cc.

Function Documentation

◆ TEST() [1/21]

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() [2/21]

TEST ( BinNodeXt  ,
FindPositionContract   
)

◆ TEST() [3/21]

TEST ( BinNodeXt  ,
InorderPositionReturnsRankOrMinusOne   
)

◆ TEST() [4/21]

TEST ( BinNodeXt  ,
InsertByKeyMaintainsCountsAndBst   
)

◆ TEST() [5/21]

◆ TEST() [6/21]

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() [7/21]

TEST ( BinNodeXt  ,
InsertDupRootXtAllowsDuplicatesAndBecomesRoot   
)

◆ TEST() [8/21]

TEST ( BinNodeXt  ,
InsertRejectsDuplicates   
)

Definition at line 317 of file bin-node-xt.cc.

References Aleph::insert_by_key_xt(), Aleph::maps(), and root().

◆ TEST() [9/21]

TEST ( BinNodeXt  ,
InsertRootXtMakesInsertedNodeRoot   
)

◆ TEST() [10/21]

◆ TEST() [11/21]

◆ TEST() [12/21]

TEST ( BinNodeXt  ,
RemoveByPosAndRemoveByKey   
)

◆ TEST() [13/21]

TEST ( BinNodeXt  ,
RotationsMaintainRankInvariant   
)

◆ TEST() [14/21]

TEST ( BinNodeXt  ,
SearchOrInsertByKeyReturnsExistingOrInserted   
)

◆ TEST() [15/21]

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() [16/21]

TEST ( BinNodeXt  ,
SelectRecAndSelectNeAndSelectParent   
)

◆ TEST() [17/21]

TEST ( BinNodeXt  ,
SentinelCountIsZero   
)

Definition at line 299 of file bin-node-xt.cc.

References Aleph::COUNT(), and Aleph::maps().

◆ TEST() [18/21]

TEST ( BinNodeXt  ,
SplitKeyDupRecXtSplitsAndEmptiesRoot   
)

◆ TEST() [19/21]

TEST ( BinNodeXt  ,
SplitKeyRecXtReturnsFalseWhenKeyPresentAndDoesNotCorrupt   
)

◆ TEST() [20/21]

TEST ( BinNodeXt  ,
SplitKeyRecXtSplitsAndEmptiesRootWhenKeyAbsent   
)

◆ TEST() [21/21]

TEST ( BinNodeXt  ,
SplitPosRecAndJoinExclusiveRoundtrip   
)