Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
binheap.cc File Reference

Tests for Binheap. More...

#include <algorithm>
#include <functional>
#include <memory>
#include <numeric>
#include <ostream>
#include <random>
#include <sstream>
#include <stdexcept>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
#include <gtest/gtest.h>
#include <tpl_binHeap.H>
#include <tpl_dynBinHeap.H>
Include dependency graph for binheap.cc:

Go to the source code of this file.

Functions

 TEST (DynBinHeapTest, InsertExtractInOrder)
 
 TEST (DynBinHeapTest, RemoveArbitraryNodes)
 
 TEST (DynBinHeapTest, UpdateReordersAfterPriorityChange)
 
 TEST (DynBinHeapTest, RandomizedInsertExtract)
 
 TEST (DynBinHeapTest, IteratorTraversesAllElements)
 
 TEST (DynBinHeapTest, EmptyRemovesAllNodes)
 
 TEST (DynBinHeapTest, UpdateWithDuplicatePriorities)
 
 TEST (BinHeapComparison, WhatTheComparisonThrowsReachesTheCaller)
 
 TEST (BinHeapComparison, RemoveAllAndDeleteDoesNotCompare)
 
 TEST (BinHeapComparison, RemoveLeavesTheNodeInTheHeapIfTheComparisonThrows)
 
 TEST (DynBinHeapComparison, WhatTheComparisonThrowsReachesTheCaller)
 
 TEST (DynBinHeapComparison, WhatTheLessThanOfTheKeysThrowsReachesTheCaller)
 
 TEST (DynBinHeapTest, MoveConstructionOutlivesTheSource)
 
 TEST (DynBinHeapTest, MoveAssignmentOutlivesTheSource)
 
 TEST (DynBinHeapTest, SwapExchangesTheContents)
 
 TEST (BinHeapShape, InsertionsAndExtractionsKeepTheTreeAndItsList)
 
 TEST (BinHeapShape, RemovalsAndUpdatesKeepTheTreeAndItsList)
 
 TEST (BinHeapShape, TheLastNodeIsTheOneAtThePlaceN)
 
 TEST (BinHeapShape, TheHeapOfTenNodesOfTheDescription)
 
 TEST (BinHeapShape, VerifyHeapLooksAtEveryNode)
 
 TEST (BinHeapThrowingCompare, SameComparisonsAndPlacesAsBefore)
 
 TEST (BinHeapThrowingCompare, EveryFailedCallLeavesTheHeapAsItWas)
 
 TEST (BinHeapThrowingCompare, AConversionInAConditionThatThrowsIsUndone)
 
 TEST (DynBinHeapComparison, EveryFailedCallLeavesTheHeapAsItWas)
 
 TEST (BinHeapShape, AComparisonThatContradictsItselfKeepsTheTree)
 
 TEST (BinHeapConstruction, ItsNoexceptFollowsTheDefaultConstructionOfTheKey)
 
 TEST (BinHeapConstruction, ItsNoexceptFollowsTheCopyOfTheComparisonThatItTakes)
 
 TEST (BinHeapConstruction, BuiltByDefaultItLetsTheFailureOfTheComparisonThrough)
 

Detailed Description

Tests for Binheap.

Definition in file binheap.cc.

Function Documentation

◆ TEST() [1/28]

TEST ( BinHeapComparison  ,
RemoveAllAndDeleteDoesNotCompare   
)

Definition at line 281 of file binheap.cc.

◆ TEST() [2/28]

TEST ( BinHeapComparison  ,
RemoveLeavesTheNodeInTheHeapIfTheComparisonThrows   
)

Definition at line 304 of file binheap.cc.

References k, min(), nodes, and out.

◆ TEST() [3/28]

TEST ( BinHeapComparison  ,
WhatTheComparisonThrowsReachesTheCaller   
)

Definition at line 262 of file binheap.cc.

References Aleph::count(), k, and out.

◆ TEST() [4/28]

TEST ( BinHeapConstruction  ,
BuiltByDefaultItLetsTheFailureOfTheComparisonThrough   
)

Definition at line 1528 of file binheap.cc.

References Aleph::Less.

◆ TEST() [5/28]

TEST ( BinHeapConstruction  ,
ItsNoexceptFollowsTheCopyOfTheComparisonThatItTakes   
)

Definition at line 1490 of file binheap.cc.

References Aleph::Less.

◆ TEST() [6/28]

TEST ( BinHeapConstruction  ,
ItsNoexceptFollowsTheDefaultConstructionOfTheKey   
)

◆ TEST() [7/28]

TEST ( BinHeapShape  ,
AComparisonThatContradictsItselfKeepsTheTree   
)

◆ TEST() [8/28]

TEST ( BinHeapShape  ,
InsertionsAndExtractionsKeepTheTreeAndItsList   
)

◆ TEST() [9/28]

◆ TEST() [10/28]

TEST ( BinHeapShape  ,
TheHeapOfTenNodesOfTheDescription   
)

◆ TEST() [11/28]

TEST ( BinHeapShape  ,
TheLastNodeIsTheOneAtThePlaceN   
)

Definition at line 777 of file binheap.cc.

References k, keys, nodes, and rng.

◆ TEST() [12/28]

TEST ( BinHeapShape  ,
VerifyHeapLooksAtEveryNode   
)

◆ TEST() [13/28]

TEST ( BinHeapThrowingCompare  ,
AConversionInAConditionThatThrowsIsUndone   
)

Definition at line 1212 of file binheap.cc.

References nodes, and out.

◆ TEST() [14/28]

TEST ( BinHeapThrowingCompare  ,
EveryFailedCallLeavesTheHeapAsItWas   
)

Definition at line 1050 of file binheap.cc.

References Aleph::and, k, keys, nodes, out, and rng.

◆ TEST() [15/28]

TEST ( BinHeapThrowingCompare  ,
SameComparisonsAndPlacesAsBefore   
)

Definition at line 988 of file binheap.cc.

References k, min(), nodes, out, and rng.

◆ TEST() [16/28]

TEST ( DynBinHeapComparison  ,
EveryFailedCallLeavesTheHeapAsItWas   
)

Definition at line 1279 of file binheap.cc.

References Aleph::and, k, keys, and rng.

◆ TEST() [17/28]

TEST ( DynBinHeapComparison  ,
WhatTheComparisonThrowsReachesTheCaller   
)

Definition at line 423 of file binheap.cc.

References Aleph::count(), and k.

◆ TEST() [18/28]

TEST ( DynBinHeapComparison  ,
WhatTheLessThanOfTheKeysThrowsReachesTheCaller   
)

Definition at line 512 of file binheap.cc.

References Aleph::count(), and k.

◆ TEST() [19/28]

◆ TEST() [20/28]

◆ TEST() [21/28]

TEST ( DynBinHeapTest  ,
IteratorTraversesAllElements   
)

◆ TEST() [22/28]

TEST ( DynBinHeapTest  ,
MoveAssignmentOutlivesTheSource   
)

Definition at line 564 of file binheap.cc.

References Aleph::DynBinHeap< T, Compare >::insert().

◆ TEST() [23/28]

TEST ( DynBinHeapTest  ,
MoveConstructionOutlivesTheSource   
)

Definition at line 543 of file binheap.cc.

◆ TEST() [24/28]

TEST ( DynBinHeapTest  ,
RandomizedInsertExtract   
)

◆ TEST() [25/28]

◆ TEST() [26/28]

TEST ( DynBinHeapTest  ,
SwapExchangesTheContents   
)

◆ TEST() [27/28]

◆ TEST() [28/28]