|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Exhaustive tests for ahSort.H sorting functions. More...
#include <gtest/gtest.h>#include <vector>#include <deque>#include <algorithm>#include <functional>#include <random>#include <string>#include <type_traits>#include <ahSort.H>#include <tpl_dynArray.H>#include <tpl_dynList.H>#include <tpl_dynDlist.H>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 (ListSortStability, EverySortKeepsTheOrderOfEqualItems) | |
| TEST (ListSortWithAComparisonThatThrows, TheListKeepsItsItems) | |
| TEST (StdSortTest, SortsVector) | |
| TEST (StdSortTest, SortsVectorWithCustomComparator) | |
| TEST (StdSortTest, SortsDeque) | |
| TEST (StdSortTest, SortsEmptyContainer) | |
| TEST (ArgsortTest, ArrayReturnsSortedOrderIndices) | |
| TEST (ArgsortTest, DynArrayReturnsSortedOrderIndices) | |
| TEST (ArgsortTest, StdVectorReturnsSortedOrderIndices) | |
| TEST (ArgsortTest, EmptyStdVectorReturnsEmptyIndex) | |
| TEST (ArgsortTest, CustomComparatorDescending) | |
| TEST (ArgsortTest, MatchesBuildIndexForAlephArrays) | |
| TEST (StableArgsortTest, ArrayPreservesEquivalentOrder) | |
| TEST (StableArgsortTest, DynArrayPreservesEquivalentOrder) | |
| TEST (StableArgsortTest, StdVectorPreservesEquivalentOrder) | |
| TEST (StableArgsortTest, AllEquivalentValuesPreserveOriginalOrder) | |
| TEST (StableArgsortTest, LargeDuplicateGroupsPreserveOriginalOrder) | |
| TEST (StableArgsortTest, ExhaustiveSmallInputsMatchStableSortReference) | |
| TEST (StableArgsortTest, ExhaustiveSmallInputsMatchDescendingStableSortReference) | |
| TEST (StableArgsortTest, CustomComparatorDescendingPreservesEquivalentOrder) | |
| TEST (StableArgsortTest, MatchesStableBuildIndexForAlephArrays) | |
| 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 (RanksTest, DuplicatesOrderingProperty) | |
| 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, StablePropertyRandom) | |
| TEST (MultiSortTest, UnstablePropertyPermutation) | |
| TEST (MultiSortTest, ReverseSorted) | |
| TEST (MultiSortTest, SizeMismatchThrows) | |
| TEST (MultiSortTest, AlephArrays) | |
| TEST (MultiSortTest, StableFlagTrue) | |
| TEST (MultiSortTest, StableFlagFalse) | |
| TEST (MultiSortTest, StableFlagFalseWithCustomComparator) | |
| TEST (SortTraitsTest, SortIsNodiscard) | |
| TEST (SortTraitsTest, RanksIsNodiscard) | |
| TEST (SortTraitsTest, PairRanksIsNodiscard) | |
| TEST (SortStressTest, LargeDynList) | |
| TEST (SortStressTest, LargeDynArray) | |
| TEST (SortStressTest, AllSameElements) | |
| TEST (SortEdgeCaseTest, StringSort) | |
| TEST (SortEdgeCaseTest, LambdaComparator) | |
Exhaustive tests for ahSort.H sorting functions.
Definition in file ahSort_test.cc.
| TEST | ( | ArgsortTest | , |
| ArrayReturnsSortedOrderIndices | |||
| ) |
Definition at line 650 of file ahSort_test.cc.
References Aleph::Array< T >::append(), Aleph::argsort(), and Aleph::Array< T >::size().
| TEST | ( | ArgsortTest | , |
| CustomComparatorDescending | |||
| ) |
Definition at line 709 of file ahSort_test.cc.
References Aleph::argsort().
| TEST | ( | ArgsortTest | , |
| DynArrayReturnsSortedOrderIndices | |||
| ) |
Definition at line 669 of file ahSort_test.cc.
References Aleph::argsort(), Aleph::DynArray< T >::reserve(), and Aleph::DynArray< T >::size().
| TEST | ( | ArgsortTest | , |
| EmptyStdVectorReturnsEmptyIndex | |||
| ) |
Definition at line 700 of file ahSort_test.cc.
References Aleph::argsort().
| TEST | ( | ArgsortTest | , |
| MatchesBuildIndexForAlephArrays | |||
| ) |
Definition at line 721 of file ahSort_test.cc.
References Aleph::argsort(), Aleph::build_index(), and Aleph::DynArray< T >::reserve().
| TEST | ( | ArgsortTest | , |
| StdVectorReturnsSortedOrderIndices | |||
| ) |
Definition at line 685 of file ahSort_test.cc.
References Aleph::argsort().
| TEST | ( | ListSortStability | , |
| EverySortKeepsTheOrderOfEqualItems | |||
| ) |
Definition at line 544 of file ahSort_test.cc.
References Aleph::DynList< T >::append(), Aleph::DynDlist< T >::append(), Aleph::in_place_sort(), Aleph::DynList< T >::size(), Aleph::DynDlist< T >::size(), and Aleph::sort().
| TEST | ( | ListSortWithAComparisonThatThrows | , |
| TheListKeepsItsItems | |||
| ) |
Definition at line 579 of file ahSort_test.cc.
References Aleph::in_place_sort(), l, and Aleph::sort().
| TEST | ( | MultiSortTest | , |
| AlephArrays | |||
| ) |
Definition at line 1222 of file ahSort_test.cc.
References Aleph::Array< T >::append(), Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| AlreadySorted | |||
| ) |
Definition at line 1135 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| BasicSort | |||
| ) |
Definition at line 1065 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| DescendingOrder | |||
| ) |
Definition at line 1089 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| EmptyArrays | |||
| ) |
Definition at line 1100 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| ReverseSorted | |||
| ) |
Definition at line 1202 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| SingleElement | |||
| ) |
Definition at line 1112 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| SizeMismatchThrows | |||
| ) |
Definition at line 1213 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| StableFlagFalse | |||
| ) |
Definition at line 1251 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| StableFlagFalseWithCustomComparator | |||
| ) |
Definition at line 1263 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| StableFlagTrue | |||
| ) |
Definition at line 1240 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| StablePropertyRandom | |||
| ) |
Definition at line 1146 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), keys, and rng.
| TEST | ( | MultiSortTest | , |
| StableSort | |||
| ) |
Definition at line 1123 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), and keys.
| TEST | ( | MultiSortTest | , |
| ThreeArrays | |||
| ) |
Definition at line 1076 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays().
| TEST | ( | MultiSortTest | , |
| UnstablePropertyPermutation | |||
| ) |
Definition at line 1173 of file ahSort_test.cc.
References Aleph::in_place_multisort_arrays(), k, keys, and rng.
| TEST | ( | PairRanksTest | , |
| ArrayPairRanks | |||
| ) |
Definition at line 1020 of file ahSort_test.cc.
References Aleph::Array< T >::append(), and Aleph::pair_ranks().
| TEST | ( | PairRanksTest | , |
| DynArrayPairRanks | |||
| ) |
Definition at line 1002 of file ahSort_test.cc.
References Aleph::pair_ranks(), and Aleph::DynArray< T >::reserve().
| TEST | ( | PairRanksTest | , |
| DynDlistPairRanks | |||
| ) |
Definition at line 1048 of file ahSort_test.cc.
References Aleph::DynDlist< T >::append(), and Aleph::pair_ranks().
| TEST | ( | PairRanksTest | , |
| DynListPairRanks | |||
| ) |
Definition at line 1033 of file ahSort_test.cc.
References Aleph::DynList< T >::append(), and Aleph::pair_ranks().
| TEST | ( | RanksTest | , |
| AlreadySorted | |||
| ) |
Definition at line 941 of file ahSort_test.cc.
References r, Aleph::ranks(), and Aleph::DynArray< T >::reserve().
| TEST | ( | RanksTest | , |
| ArrayRanks | |||
| ) |
Definition at line 882 of file ahSort_test.cc.
References Aleph::Array< T >::append(), r, and Aleph::ranks().
| TEST | ( | RanksTest | , |
| DuplicatesOrderingProperty | |||
| ) |
Definition at line 967 of file ahSort_test.cc.
References k, r, Aleph::ranks(), Aleph::DynArray< T >::reserve(), and Aleph::DynArray< T >::size().
| TEST | ( | RanksTest | , |
| DynArrayRanks | |||
| ) |
Definition at line 867 of file ahSort_test.cc.
References r, Aleph::ranks(), and Aleph::DynArray< T >::reserve().
| TEST | ( | RanksTest | , |
| DynDlistRanks | |||
| ) |
Definition at line 910 of file ahSort_test.cc.
References Aleph::DynDlist< T >::append(), r, and Aleph::ranks().
| TEST | ( | RanksTest | , |
| DynListRanks | |||
| ) |
Definition at line 896 of file ahSort_test.cc.
References Aleph::DynList< T >::append(), r, and Aleph::ranks().
| TEST | ( | RanksTest | , |
| EmptyContainer | |||
| ) |
Definition at line 924 of file ahSort_test.cc.
References r, and Aleph::ranks().
| TEST | ( | RanksTest | , |
| Reversed | |||
| ) |
Definition at line 954 of file ahSort_test.cc.
References r, Aleph::ranks(), and Aleph::DynArray< T >::reserve().
| TEST | ( | RanksTest | , |
| SingleElement | |||
| ) |
Definition at line 931 of file ahSort_test.cc.
References r, Aleph::ranks(), Aleph::DynArray< T >::reserve(), and Aleph::DynArray< T >::touch().
| TEST | ( | SortEdgeCaseTest | , |
| LambdaComparator | |||
| ) |
Definition at line 1361 of file ahSort_test.cc.
References Aleph::DynArray< T >::reserve(), and Aleph::sort().
| TEST | ( | SortEdgeCaseTest | , |
| StringSort | |||
| ) |
Definition at line 1348 of file ahSort_test.cc.
References Aleph::DynList< T >::append(), and Aleph::sort().
| TEST | ( | SortStressTest | , |
| AllSameElements | |||
| ) |
Definition at line 1334 of file ahSort_test.cc.
References Aleph::DynList< T >::append(), Aleph::is_sorted(), and Aleph::sort().
| TEST | ( | SortStressTest | , |
| LargeDynArray | |||
| ) |
Definition at line 1321 of file ahSort_test.cc.
References Aleph::in_place_sort(), Aleph::DynArray< T >::reserve(), and Aleph::DynArray< T >::size().
| TEST | ( | SortStressTest | , |
| LargeDynList | |||
| ) |
Definition at line 1309 of file ahSort_test.cc.
References Aleph::DynList< T >::append(), Aleph::is_sorted(), and Aleph::sort().
| TEST | ( | SortTraitsTest | , |
| PairRanksIsNodiscard | |||
| ) |
Definition at line 1297 of file ahSort_test.cc.
References Aleph::pair_ranks(), Aleph::DynArray< T >::reserve(), and Aleph::DynArray< T >::touch().
| TEST | ( | SortTraitsTest | , |
| RanksIsNodiscard | |||
| ) |
Definition at line 1289 of file ahSort_test.cc.
References r, Aleph::ranks(), Aleph::DynArray< T >::reserve(), and Aleph::DynArray< T >::touch().
| TEST | ( | SortTraitsTest | , |
| SortIsNodiscard | |||
| ) |
Definition at line 1278 of file ahSort_test.cc.
References Aleph::DynList< T >::append(), and Aleph::sort().
| TEST | ( | StableArgsortTest | , |
| AllEquivalentValuesPreserveOriginalOrder | |||
| ) |
Definition at line 793 of file ahSort_test.cc.
References Aleph::stable_argsort().
| TEST | ( | StableArgsortTest | , |
| ArrayPreservesEquivalentOrder | |||
| ) |
Definition at line 739 of file ahSort_test.cc.
References Aleph::Array< T >::append(), Aleph::Array< T >::size(), and Aleph::stable_argsort().
| TEST | ( | StableArgsortTest | , |
| CustomComparatorDescendingPreservesEquivalentOrder | |||
| ) |
Definition at line 831 of file ahSort_test.cc.
References Aleph::stable_argsort().
| TEST | ( | StableArgsortTest | , |
| DynArrayPreservesEquivalentOrder | |||
| ) |
Definition at line 759 of file ahSort_test.cc.
References Aleph::DynArray< T >::reserve(), Aleph::DynArray< T >::size(), and Aleph::stable_argsort().
| TEST | ( | StableArgsortTest | , |
| ExhaustiveSmallInputsMatchDescendingStableSortReference | |||
| ) |
Definition at line 826 of file ahSort_test.cc.
| TEST | ( | StableArgsortTest | , |
| ExhaustiveSmallInputsMatchStableSortReference | |||
| ) |
Definition at line 821 of file ahSort_test.cc.
| TEST | ( | StableArgsortTest | , |
| LargeDuplicateGroupsPreserveOriginalOrder | |||
| ) |
Definition at line 804 of file ahSort_test.cc.
References Aleph::stable_argsort().
| TEST | ( | StableArgsortTest | , |
| MatchesStableBuildIndexForAlephArrays | |||
| ) |
Definition at line 845 of file ahSort_test.cc.
References Aleph::DynArray< T >::reserve(), Aleph::stable_argsort(), and Aleph::stable_build_index().
| TEST | ( | StableArgsortTest | , |
| StdVectorPreservesEquivalentOrder | |||
| ) |
Definition at line 779 of file ahSort_test.cc.
References Aleph::stable_argsort().
| TEST | ( | StdSortTest | , |
| SortsDeque | |||
| ) |
Definition at line 632 of file ahSort_test.cc.
References Aleph::stdsort().
| TEST | ( | StdSortTest | , |
| SortsEmptyContainer | |||
| ) |
Definition at line 639 of file ahSort_test.cc.
References Aleph::stdsort().
| TEST | ( | StdSortTest | , |
| SortsVector | |||
| ) |
Definition at line 616 of file ahSort_test.cc.
References Aleph::stdsort().
| TEST | ( | StdSortTest | , |
| SortsVectorWithCustomComparator | |||
| ) |
Definition at line 625 of file ahSort_test.cc.
References Aleph::stdsort().
| TEST_F | ( | ArraySortTest | , |
| InPlaceSortModifiesOriginal | |||
| ) |
Definition at line 428 of file ahSort_test.cc.
References Aleph::in_place_sort().
| TEST_F | ( | ArraySortTest | , |
| SortMoveSemantics | |||
| ) |
Definition at line 420 of file ahSort_test.cc.
References Aleph::build_array(), and Aleph::sort().
| TEST_F | ( | ArraySortTest | , |
| SortReturnsSortedCopy | |||
| ) |
Definition at line 411 of file ahSort_test.cc.
References Aleph::sort().
| TEST_F | ( | DynArraySortTest | , |
| InPlaceSortModifiesOriginal | |||
| ) |
Definition at line 376 of file ahSort_test.cc.
References Aleph::in_place_sort().
| TEST_F | ( | DynArraySortTest | , |
| InPlaceSortReturnsReference | |||
| ) |
Definition at line 384 of file ahSort_test.cc.
References Aleph::in_place_sort().
| TEST_F | ( | DynArraySortTest | , |
| SortEmptyArray | |||
| ) |
Definition at line 390 of file ahSort_test.cc.
References Aleph::sort().
| TEST_F | ( | DynArraySortTest | , |
| SortMoveSemantics | |||
| ) |
Definition at line 362 of file ahSort_test.cc.
References Aleph::build_array(), Aleph::DynArray< T >::size(), and Aleph::sort().
| TEST_F | ( | DynArraySortTest | , |
| SortReturnsSortedCopy | |||
| ) |
Definition at line 342 of file ahSort_test.cc.
References Aleph::sort().
| TEST_F | ( | DynArraySortTest | , |
| SortSingleElement | |||
| ) |
Definition at line 397 of file ahSort_test.cc.
References Aleph::DynArray< T >::reserve(), Aleph::sort(), and Aleph::DynArray< T >::touch().
| TEST_F | ( | DynArraySortTest | , |
| SortWithCustomComparator | |||
| ) |
Definition at line 354 of file ahSort_test.cc.
References Aleph::sort().
| TEST_F | ( | DynDlistSortTest | , |
| InPlaceSortModifiesOriginal | |||
| ) |
Definition at line 332 of file ahSort_test.cc.
References Aleph::in_place_sort(), and Aleph::is_sorted().
| TEST_F | ( | DynDlistSortTest | , |
| SortMoveSemantics | |||
| ) |
Definition at line 324 of file ahSort_test.cc.
References Aleph::Dlink::is_empty(), Aleph::is_sorted(), and Aleph::sort().
| TEST_F | ( | DynDlistSortTest | , |
| SortReturnsSortedCopy | |||
| ) |
Definition at line 306 of file ahSort_test.cc.
References Aleph::is_sorted(), and Aleph::sort().
| TEST_F | ( | DynDlistSortTest | , |
| SortWithCustomComparator | |||
| ) |
Definition at line 313 of file ahSort_test.cc.
References Aleph::sort().
| TEST_F | ( | DynListSortTest | , |
| InPlaceSortModifiesOriginal | |||
| ) |
Definition at line 246 of file ahSort_test.cc.
References Aleph::in_place_sort().
| TEST_F | ( | DynListSortTest | , |
| InPlaceSortReturnsReference | |||
| ) |
Definition at line 258 of file ahSort_test.cc.
References Aleph::in_place_sort().
| TEST_F | ( | DynListSortTest | , |
| SortAlreadySorted | |||
| ) |
Definition at line 280 of file ahSort_test.cc.
References Aleph::is_sorted(), and Aleph::sort().
| TEST_F | ( | DynListSortTest | , |
| SortEmptyList | |||
| ) |
Definition at line 264 of file ahSort_test.cc.
References Aleph::sort().
| TEST_F | ( | DynListSortTest | , |
| SortMoveSemantics | |||
| ) |
Definition at line 233 of file ahSort_test.cc.
References Aleph::HTList::is_empty(), and Aleph::sort().
| TEST_F | ( | DynListSortTest | , |
| SortReturnsSortedCopy | |||
| ) |
Definition at line 206 of file ahSort_test.cc.
References Aleph::sort().
| TEST_F | ( | DynListSortTest | , |
| SortReversed | |||
| ) |
Definition at line 287 of file ahSort_test.cc.
References Aleph::is_sorted(), and Aleph::sort().
| TEST_F | ( | DynListSortTest | , |
| SortSingleElement | |||
| ) |
Definition at line 271 of file ahSort_test.cc.
References Aleph::DynList< T >::append(), and Aleph::sort().
| TEST_F | ( | DynListSortTest | , |
| SortWithCustomComparator | |||
| ) |
Definition at line 221 of file ahSort_test.cc.
References Aleph::sort().
| TEST_F | ( | DynListSortTest | , |
| SortWithDuplicates | |||
| ) |
Definition at line 295 of file ahSort_test.cc.
References Aleph::is_sorted(), and Aleph::sort().