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

Exhaustive tests for ahSort.H sorting functions. More...

#include <gtest/gtest.h>
#include <vector>
#include <deque>
#include <algorithm>
#include <string>
#include <ahSort.H>
#include <tpl_dynArray.H>
#include <tpl_dynList.H>
#include <tpl_dynDlist.H>
Include dependency graph for ahSort_test.cc:

Go to the source code of this file.

Classes

class  DynListSortTest
 
class  DynDlistSortTest
 
class  DynArraySortTest
 
class  ArraySortTest
 

Functions

 TEST_F (DynListSortTest, SortReturnsSortedCopy)
 
 TEST_F (DynListSortTest, SortWithCustomComparator)
 
 TEST_F (DynListSortTest, SortMoveSemantics)
 
 TEST_F (DynListSortTest, InPlaceSortModifiesOriginal)
 
 TEST_F (DynListSortTest, InPlaceSortReturnsReference)
 
 TEST_F (DynListSortTest, SortEmptyList)
 
 TEST_F (DynListSortTest, SortSingleElement)
 
 TEST_F (DynListSortTest, SortAlreadySorted)
 
 TEST_F (DynListSortTest, SortReversed)
 
 TEST_F (DynListSortTest, SortWithDuplicates)
 
 TEST_F (DynDlistSortTest, SortReturnsSortedCopy)
 
 TEST_F (DynDlistSortTest, SortWithCustomComparator)
 
 TEST_F (DynDlistSortTest, SortMoveSemantics)
 
 TEST_F (DynDlistSortTest, InPlaceSortModifiesOriginal)
 
 TEST_F (DynArraySortTest, SortReturnsSortedCopy)
 
 TEST_F (DynArraySortTest, SortWithCustomComparator)
 
 TEST_F (DynArraySortTest, SortMoveSemantics)
 
 TEST_F (DynArraySortTest, InPlaceSortModifiesOriginal)
 
 TEST_F (DynArraySortTest, InPlaceSortReturnsReference)
 
 TEST_F (DynArraySortTest, SortEmptyArray)
 
 TEST_F (DynArraySortTest, SortSingleElement)
 
 TEST_F (ArraySortTest, SortReturnsSortedCopy)
 
 TEST_F (ArraySortTest, SortMoveSemantics)
 
 TEST_F (ArraySortTest, InPlaceSortModifiesOriginal)
 
 TEST (StdSortTest, SortsVector)
 
 TEST (StdSortTest, SortsVectorWithCustomComparator)
 
 TEST (StdSortTest, SortsDeque)
 
 TEST (StdSortTest, SortsEmptyContainer)
 
 TEST (RanksTest, DynArrayRanks)
 
 TEST (RanksTest, ArrayRanks)
 
 TEST (RanksTest, DynListRanks)
 
 TEST (RanksTest, DynDlistRanks)
 
 TEST (RanksTest, EmptyContainer)
 
 TEST (RanksTest, SingleElement)
 
 TEST (RanksTest, AlreadySorted)
 
 TEST (RanksTest, Reversed)
 
 TEST (PairRanksTest, DynArrayPairRanks)
 
 TEST (PairRanksTest, ArrayPairRanks)
 
 TEST (PairRanksTest, DynListPairRanks)
 
 TEST (PairRanksTest, DynDlistPairRanks)
 
 TEST (MultiSortTest, BasicSort)
 
 TEST (MultiSortTest, ThreeArrays)
 
 TEST (MultiSortTest, DescendingOrder)
 
 TEST (MultiSortTest, EmptyArrays)
 
 TEST (MultiSortTest, SingleElement)
 
 TEST (MultiSortTest, StableSort)
 
 TEST (MultiSortTest, AlreadySorted)
 
 TEST (MultiSortTest, ReverseSorted)
 
 TEST (MultiSortTest, SizeMismatchThrows)
 
 TEST (MultiSortTest, AlephArrays)
 
 TEST (SortTraitsTest, SortIsNodiscard)
 
 TEST (SortTraitsTest, RanksIsNodiscard)
 
 TEST (SortTraitsTest, PairRanksIsNodiscard)
 
 TEST (SortStressTest, LargeDynList)
 
 TEST (SortStressTest, LargeDynArray)
 
 TEST (SortStressTest, AllSameElements)
 
 TEST (SortEdgeCaseTest, StringSort)
 
 TEST (SortEdgeCaseTest, LambdaComparator)
 

Detailed Description

Exhaustive tests for ahSort.H sorting functions.

Definition in file ahSort_test.cc.

Function Documentation

◆ TEST() [1/34]

TEST ( MultiSortTest  ,
AlephArrays   
)

◆ TEST() [2/34]

TEST ( MultiSortTest  ,
AlreadySorted   
)

Definition at line 649 of file ahSort_test.cc.

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

◆ TEST() [3/34]

TEST ( MultiSortTest  ,
BasicSort   
)

Definition at line 579 of file ahSort_test.cc.

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

◆ TEST() [4/34]

TEST ( MultiSortTest  ,
DescendingOrder   
)

Definition at line 603 of file ahSort_test.cc.

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

◆ TEST() [5/34]

TEST ( MultiSortTest  ,
EmptyArrays   
)

Definition at line 614 of file ahSort_test.cc.

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

◆ TEST() [6/34]

TEST ( MultiSortTest  ,
ReverseSorted   
)

Definition at line 660 of file ahSort_test.cc.

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

◆ TEST() [7/34]

TEST ( MultiSortTest  ,
SingleElement   
)

Definition at line 626 of file ahSort_test.cc.

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

◆ TEST() [8/34]

TEST ( MultiSortTest  ,
SizeMismatchThrows   
)

Definition at line 671 of file ahSort_test.cc.

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

◆ TEST() [9/34]

TEST ( MultiSortTest  ,
StableSort   
)

Definition at line 637 of file ahSort_test.cc.

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

◆ TEST() [10/34]

TEST ( MultiSortTest  ,
ThreeArrays   
)

Definition at line 590 of file ahSort_test.cc.

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

◆ TEST() [11/34]

TEST ( PairRanksTest  ,
ArrayPairRanks   
)

Definition at line 534 of file ahSort_test.cc.

References Aleph::Array< T >::append(), Aleph::maps(), and Aleph::pair_ranks().

◆ TEST() [12/34]

TEST ( PairRanksTest  ,
DynArrayPairRanks   
)

◆ TEST() [13/34]

TEST ( PairRanksTest  ,
DynDlistPairRanks   
)

◆ TEST() [14/34]

TEST ( PairRanksTest  ,
DynListPairRanks   
)

Definition at line 547 of file ahSort_test.cc.

References Aleph::DynList< T >::append(), Aleph::maps(), and Aleph::pair_ranks().

◆ TEST() [15/34]

TEST ( RanksTest  ,
AlreadySorted   
)

Definition at line 486 of file ahSort_test.cc.

References Aleph::maps(), Aleph::ranks(), and Aleph::DynArray< T >::reserve().

◆ TEST() [16/34]

TEST ( RanksTest  ,
ArrayRanks   
)

Definition at line 427 of file ahSort_test.cc.

References Aleph::Array< T >::append(), Aleph::maps(), and Aleph::ranks().

◆ TEST() [17/34]

TEST ( RanksTest  ,
DynArrayRanks   
)

Definition at line 412 of file ahSort_test.cc.

References Aleph::maps(), Aleph::ranks(), and Aleph::DynArray< T >::reserve().

◆ TEST() [18/34]

TEST ( RanksTest  ,
DynDlistRanks   
)

Definition at line 455 of file ahSort_test.cc.

References Aleph::DynDlist< T >::append(), Aleph::maps(), and Aleph::ranks().

◆ TEST() [19/34]

TEST ( RanksTest  ,
DynListRanks   
)

Definition at line 441 of file ahSort_test.cc.

References Aleph::DynList< T >::append(), Aleph::maps(), and Aleph::ranks().

◆ TEST() [20/34]

TEST ( RanksTest  ,
EmptyContainer   
)

Definition at line 469 of file ahSort_test.cc.

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

◆ TEST() [21/34]

TEST ( RanksTest  ,
Reversed   
)

Definition at line 499 of file ahSort_test.cc.

References Aleph::maps(), Aleph::ranks(), and Aleph::DynArray< T >::reserve().

◆ TEST() [22/34]

TEST ( RanksTest  ,
SingleElement   
)

Definition at line 476 of file ahSort_test.cc.

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

◆ TEST() [23/34]

TEST ( SortEdgeCaseTest  ,
LambdaComparator   
)

Definition at line 785 of file ahSort_test.cc.

References Aleph::maps(), Aleph::DynArray< T >::reserve(), and Aleph::sort().

◆ TEST() [24/34]

TEST ( SortEdgeCaseTest  ,
StringSort   
)

◆ TEST() [25/34]

TEST ( SortStressTest  ,
AllSameElements   
)

◆ TEST() [26/34]

TEST ( SortStressTest  ,
LargeDynArray   
)

◆ TEST() [27/34]

TEST ( SortStressTest  ,
LargeDynList   
)

◆ TEST() [28/34]

TEST ( SortTraitsTest  ,
PairRanksIsNodiscard   
)

◆ TEST() [29/34]

TEST ( SortTraitsTest  ,
RanksIsNodiscard   
)

◆ TEST() [30/34]

TEST ( SortTraitsTest  ,
SortIsNodiscard   
)

Definition at line 702 of file ahSort_test.cc.

References Aleph::DynList< T >::append(), Aleph::maps(), and Aleph::sort().

◆ TEST() [31/34]

TEST ( StdSortTest  ,
SortsDeque   
)

Definition at line 394 of file ahSort_test.cc.

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

◆ TEST() [32/34]

TEST ( StdSortTest  ,
SortsEmptyContainer   
)

Definition at line 401 of file ahSort_test.cc.

References Aleph::DynList< T >::empty(), Aleph::maps(), and Aleph::stdsort().

◆ TEST() [33/34]

TEST ( StdSortTest  ,
SortsVector   
)

Definition at line 378 of file ahSort_test.cc.

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

◆ TEST() [34/34]

TEST ( StdSortTest  ,
SortsVectorWithCustomComparator   
)

Definition at line 387 of file ahSort_test.cc.

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

◆ TEST_F() [1/24]

TEST_F ( ArraySortTest  ,
InPlaceSortModifiesOriginal   
)

Definition at line 367 of file ahSort_test.cc.

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

◆ TEST_F() [2/24]

TEST_F ( ArraySortTest  ,
SortMoveSemantics   
)

Definition at line 359 of file ahSort_test.cc.

References Aleph::build_array(), Aleph::maps(), and Aleph::sort().

◆ TEST_F() [3/24]

TEST_F ( ArraySortTest  ,
SortReturnsSortedCopy   
)

Definition at line 350 of file ahSort_test.cc.

References Aleph::maps(), Aleph::HTList::size(), and Aleph::sort().

◆ TEST_F() [4/24]

TEST_F ( DynArraySortTest  ,
InPlaceSortModifiesOriginal   
)

Definition at line 315 of file ahSort_test.cc.

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

◆ TEST_F() [5/24]

TEST_F ( DynArraySortTest  ,
InPlaceSortReturnsReference   
)

Definition at line 323 of file ahSort_test.cc.

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

◆ TEST_F() [6/24]

TEST_F ( DynArraySortTest  ,
SortEmptyArray   
)

Definition at line 329 of file ahSort_test.cc.

References Aleph::maps(), Aleph::HTList::size(), and Aleph::sort().

◆ TEST_F() [7/24]

TEST_F ( DynArraySortTest  ,
SortMoveSemantics   
)

◆ TEST_F() [8/24]

TEST_F ( DynArraySortTest  ,
SortReturnsSortedCopy   
)

Definition at line 281 of file ahSort_test.cc.

References Aleph::maps(), Aleph::HTList::size(), and Aleph::sort().

◆ TEST_F() [9/24]

TEST_F ( DynArraySortTest  ,
SortSingleElement   
)

Definition at line 336 of file ahSort_test.cc.

References Aleph::maps(), Aleph::HTList::size(), and Aleph::sort().

◆ TEST_F() [10/24]

TEST_F ( DynArraySortTest  ,
SortWithCustomComparator   
)

Definition at line 293 of file ahSort_test.cc.

References Aleph::maps(), Aleph::HTList::size(), and Aleph::sort().

◆ TEST_F() [11/24]

TEST_F ( DynDlistSortTest  ,
InPlaceSortModifiesOriginal   
)

Definition at line 271 of file ahSort_test.cc.

References Aleph::in_place_sort(), Aleph::is_sorted(), and Aleph::maps().

◆ TEST_F() [12/24]

TEST_F ( DynDlistSortTest  ,
SortMoveSemantics   
)

◆ TEST_F() [13/24]

TEST_F ( DynDlistSortTest  ,
SortReturnsSortedCopy   
)

Definition at line 245 of file ahSort_test.cc.

References Aleph::is_sorted(), Aleph::maps(), and Aleph::sort().

◆ TEST_F() [14/24]

TEST_F ( DynDlistSortTest  ,
SortWithCustomComparator   
)

◆ TEST_F() [15/24]

TEST_F ( DynListSortTest  ,
InPlaceSortModifiesOriginal   
)

Definition at line 185 of file ahSort_test.cc.

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

◆ TEST_F() [16/24]

TEST_F ( DynListSortTest  ,
InPlaceSortReturnsReference   
)

Definition at line 197 of file ahSort_test.cc.

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

◆ TEST_F() [17/24]

TEST_F ( DynListSortTest  ,
SortAlreadySorted   
)

Definition at line 219 of file ahSort_test.cc.

References Aleph::is_sorted(), Aleph::maps(), and Aleph::sort().

◆ TEST_F() [18/24]

TEST_F ( DynListSortTest  ,
SortEmptyList   
)

Definition at line 203 of file ahSort_test.cc.

References Aleph::HTList::is_empty(), Aleph::maps(), and Aleph::sort().

◆ TEST_F() [19/24]

◆ TEST_F() [20/24]

TEST_F ( DynListSortTest  ,
SortReturnsSortedCopy   
)

◆ TEST_F() [21/24]

TEST_F ( DynListSortTest  ,
SortReversed   
)

◆ TEST_F() [22/24]

TEST_F ( DynListSortTest  ,
SortSingleElement   
)

◆ TEST_F() [23/24]

TEST_F ( DynListSortTest  ,
SortWithCustomComparator   
)

◆ TEST_F() [24/24]

TEST_F ( DynListSortTest  ,
SortWithDuplicates   
)

Definition at line 234 of file ahSort_test.cc.

References Aleph::is_sorted(), Aleph::maps(), and Aleph::sort().