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

Comprehensive test suite for ahAlgo.H. More...

#include <gtest/gtest.h>
#include <vector>
#include <ahAlgo.H>
#include <tpl_dynDlist.H>
#include <tpl_array.H>
Include dependency graph for ahAlgo.cc:

Go to the source code of this file.

Functions

 TEST (ForEach, SumElements)
 
 TEST (ForEach, ModifyElements)
 
 TEST (ForEach, EmptyRange)
 
 TEST (CountIf, CountEvenNumbers)
 
 TEST (CountIf, CountNone)
 
 TEST (CountIf, CountAll)
 
 TEST (Count, CountValue)
 
 TEST (Count, CountMissing)
 
 TEST (MinElement, FindMinimum)
 
 TEST (MinElement, EmptyRange)
 
 TEST (MaxElement, FindMaximum)
 
 TEST (FindIf, FindFirstEven)
 
 TEST (FindIf, FindNothing)
 
 TEST (Find, FindValue)
 
 TEST (Find, FindMissing)
 
 TEST (SearchN, FindConsecutive)
 
 TEST (SearchN, NotEnoughConsecutive)
 
 TEST (SearchN, ZeroCount)
 
 TEST (AdjacentFind, FindDuplicate)
 
 TEST (AdjacentFind, NoDuplicate)
 
 TEST (AdjacentFind, EmptyRange)
 
 TEST (Equal, EqualRanges)
 
 TEST (Equal, UnequalRanges)
 
 TEST (LexCompare, LessThan)
 
 TEST (LexCompare, GreaterThan)
 
 TEST (LexCompare, PrefixLessThan)
 
 TEST (Copy, BasicCopy)
 
 TEST (CopyBackward, BasicCopyBackward)
 
 TEST (Transform, UnaryTransform)
 
 TEST (Transform, BinaryTransform)
 
 TEST (SwapRanges, BasicSwap)
 
 TEST (Fill, FillRange)
 
 TEST (FillN, FillNElements)
 
 TEST (Generate, GenerateSequence)
 
 TEST (GenerateN, GenerateNElements)
 
 TEST (ReplaceIf, ReplaceEvenNumbers)
 
 TEST (Replace, ReplaceValue)
 
 TEST (ReplaceCopyIf, BasicReplaceCopy)
 
 TEST (Reverse, ReverseElements)
 
 TEST (Reverse, ReverseSingleElement)
 
 TEST (Reverse, ReverseEmpty)
 
 TEST (ReverseCopy, BasicReverseCopy)
 
 TEST (Rotate, RotateElements)
 
 TEST (LowerBound, FindPosition)
 
 TEST (LowerBound, ValueNotPresent)
 
 TEST (UpperBound, FindPosition)
 
 TEST (BinarySearch, ValueExists)
 
 TEST (BinarySearch, ValueMissing)
 
 TEST (EqualRange, FindRange)
 
 TEST (Includes, SubsetIncluded)
 
 TEST (Includes, SubsetNotIncluded)
 
 TEST (Includes, EmptySubset)
 
 TEST (Merge, MergeSortedRanges)
 
 TEST (Merge, MergeWithEmpty)
 
 TEST (Accumulate, SumElements)
 
 TEST (Accumulate, ProductElements)
 
 TEST (Accumulate, WithInitialValue)
 
 TEST (Accumulate, EmptyRange)
 
 TEST (InnerProduct, DotProduct)
 
 TEST (InnerProduct, CustomOperations)
 
 TEST (PartialSum, CumulativeSum)
 
 TEST (PartialSum, CustomOperation)
 
 TEST (PartialSum, EmptyRange)
 
 TEST (AdjacentDifference, ComputeDifferences)
 
 TEST (AdjacentDifference, CustomOperation)
 
 TEST (Unique, RemoveDuplicates)
 
 TEST (Unique, NoDuplicates)
 
 TEST (RemoveIf, RemoveEvenNumbers)
 
 TEST (Remove, RemoveValue)
 
 TEST (RemoveCopyIf, BasicCopy)
 
 TEST (UniqueCopy, BasicCopy)
 
 TEST (EdgeCases, SingleElement)
 
 TEST (EdgeCases, LargeRange)
 
 TEST (Mismatch, FindMismatch)
 
 TEST (Mismatch, NoMismatch)
 
 TEST (Search, FindSubsequence)
 
 TEST (Search, SubsequenceNotFound)
 

Detailed Description

Comprehensive test suite for ahAlgo.H.

Tests all STL-like algorithm implementations in Aleph-w.

Definition in file ahAlgo.cc.

Function Documentation

◆ TEST() [1/77]

TEST ( Accumulate  ,
EmptyRange   
)

Definition at line 645 of file ahAlgo.cc.

References Aleph::accumulate(), Aleph::maps(), and Aleph::sum().

◆ TEST() [2/77]

TEST ( Accumulate  ,
ProductElements   
)

Definition at line 630 of file ahAlgo.cc.

References Aleph::accumulate(), Aleph::maps(), and Aleph::product().

◆ TEST() [3/77]

TEST ( Accumulate  ,
SumElements   
)

Definition at line 623 of file ahAlgo.cc.

References Aleph::accumulate(), Aleph::maps(), and Aleph::sum().

◆ TEST() [4/77]

TEST ( Accumulate  ,
WithInitialValue   
)

Definition at line 638 of file ahAlgo.cc.

References Aleph::accumulate(), Aleph::maps(), and Aleph::sum().

◆ TEST() [5/77]

TEST ( AdjacentDifference  ,
ComputeDifferences   
)

◆ TEST() [6/77]

TEST ( AdjacentDifference  ,
CustomOperation   
)

◆ TEST() [7/77]

TEST ( AdjacentFind  ,
EmptyRange   
)

Definition at line 199 of file ahAlgo.cc.

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

◆ TEST() [8/77]

TEST ( AdjacentFind  ,
FindDuplicate   
)

Definition at line 184 of file ahAlgo.cc.

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

◆ TEST() [9/77]

TEST ( AdjacentFind  ,
NoDuplicate   
)

Definition at line 192 of file ahAlgo.cc.

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

◆ TEST() [10/77]

TEST ( BinarySearch  ,
ValueExists   
)

Definition at line 536 of file ahAlgo.cc.

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

◆ TEST() [11/77]

TEST ( BinarySearch  ,
ValueMissing   
)

Definition at line 542 of file ahAlgo.cc.

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

◆ TEST() [12/77]

TEST ( Copy  ,
BasicCopy   
)

Definition at line 256 of file ahAlgo.cc.

References StlAlephIterator< SetName >::begin(), Aleph::copy(), and Aleph::maps().

◆ TEST() [13/77]

TEST ( CopyBackward  ,
BasicCopyBackward   
)

◆ TEST() [14/77]

TEST ( Count  ,
CountMissing   
)

Definition at line 84 of file ahAlgo.cc.

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

◆ TEST() [15/77]

TEST ( Count  ,
CountValue   
)

Definition at line 77 of file ahAlgo.cc.

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

◆ TEST() [16/77]

TEST ( CountIf  ,
CountAll   
)

Definition at line 69 of file ahAlgo.cc.

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

◆ TEST() [17/77]

TEST ( CountIf  ,
CountEvenNumbers   
)

Definition at line 53 of file ahAlgo.cc.

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

◆ TEST() [18/77]

TEST ( CountIf  ,
CountNone   
)

Definition at line 61 of file ahAlgo.cc.

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

◆ TEST() [19/77]

TEST ( EdgeCases  ,
LargeRange   
)

◆ TEST() [20/77]

TEST ( EdgeCases  ,
SingleElement   
)

Definition at line 844 of file ahAlgo.cc.

References Aleph::accumulate(), Aleph::count(), Aleph::maps(), and Aleph::min_element().

◆ TEST() [21/77]

TEST ( Equal  ,
EqualRanges   
)

Definition at line 210 of file ahAlgo.cc.

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

◆ TEST() [22/77]

TEST ( Equal  ,
UnequalRanges   
)

Definition at line 217 of file ahAlgo.cc.

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

◆ TEST() [23/77]

TEST ( EqualRange  ,
FindRange   
)

Definition at line 552 of file ahAlgo.cc.

References Aleph::equal_range(), Aleph::maps(), and Aleph::range().

◆ TEST() [24/77]

TEST ( Fill  ,
FillRange   
)

Definition at line 334 of file ahAlgo.cc.

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

◆ TEST() [25/77]

TEST ( FillN  ,
FillNElements   
)

Definition at line 345 of file ahAlgo.cc.

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

◆ TEST() [26/77]

TEST ( Find  ,
FindMissing   
)

Definition at line 147 of file ahAlgo.cc.

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

◆ TEST() [27/77]

TEST ( Find  ,
FindValue   
)

Definition at line 139 of file ahAlgo.cc.

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

◆ TEST() [28/77]

TEST ( FindIf  ,
FindFirstEven   
)

Definition at line 122 of file ahAlgo.cc.

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

◆ TEST() [29/77]

TEST ( FindIf  ,
FindNothing   
)

Definition at line 131 of file ahAlgo.cc.

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

◆ TEST() [30/77]

TEST ( ForEach  ,
EmptyRange   
)

Definition at line 41 of file ahAlgo.cc.

References Aleph::count(), Aleph::for_each(), and Aleph::maps().

◆ TEST() [31/77]

TEST ( ForEach  ,
ModifyElements   
)

Definition at line 30 of file ahAlgo.cc.

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

◆ TEST() [32/77]

TEST ( ForEach  ,
SumElements   
)

Definition at line 22 of file ahAlgo.cc.

References Aleph::for_each(), Aleph::maps(), and Aleph::sum().

◆ TEST() [33/77]

TEST ( Generate  ,
GenerateSequence   
)

Definition at line 362 of file ahAlgo.cc.

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

◆ TEST() [34/77]

TEST ( GenerateN  ,
GenerateNElements   
)

Definition at line 374 of file ahAlgo.cc.

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

◆ TEST() [35/77]

TEST ( Includes  ,
EmptySubset   
)

Definition at line 579 of file ahAlgo.cc.

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

◆ TEST() [36/77]

TEST ( Includes  ,
SubsetIncluded   
)

Definition at line 565 of file ahAlgo.cc.

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

◆ TEST() [37/77]

TEST ( Includes  ,
SubsetNotIncluded   
)

Definition at line 572 of file ahAlgo.cc.

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

◆ TEST() [38/77]

TEST ( InnerProduct  ,
CustomOperations   
)

Definition at line 665 of file ahAlgo.cc.

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

◆ TEST() [39/77]

TEST ( InnerProduct  ,
DotProduct   
)

Definition at line 656 of file ahAlgo.cc.

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

◆ TEST() [40/77]

TEST ( LexCompare  ,
GreaterThan   
)

Definition at line 236 of file ahAlgo.cc.

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

◆ TEST() [41/77]

TEST ( LexCompare  ,
LessThan   
)

Definition at line 228 of file ahAlgo.cc.

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

◆ TEST() [42/77]

TEST ( LexCompare  ,
PrefixLessThan   
)

Definition at line 244 of file ahAlgo.cc.

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

◆ TEST() [43/77]

TEST ( LowerBound  ,
FindPosition   
)

Definition at line 508 of file ahAlgo.cc.

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

◆ TEST() [44/77]

TEST ( LowerBound  ,
ValueNotPresent   
)

Definition at line 516 of file ahAlgo.cc.

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

◆ TEST() [45/77]

TEST ( MaxElement  ,
FindMaximum   
)

Definition at line 110 of file ahAlgo.cc.

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

◆ TEST() [46/77]

TEST ( Merge  ,
MergeSortedRanges   
)

Definition at line 590 of file ahAlgo.cc.

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

◆ TEST() [47/77]

TEST ( Merge  ,
MergeWithEmpty   
)

Definition at line 606 of file ahAlgo.cc.

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

◆ TEST() [48/77]

TEST ( MinElement  ,
EmptyRange   
)

Definition at line 103 of file ahAlgo.cc.

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

◆ TEST() [49/77]

TEST ( MinElement  ,
FindMinimum   
)

Definition at line 95 of file ahAlgo.cc.

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

◆ TEST() [50/77]

TEST ( Mismatch  ,
FindMismatch   
)

Definition at line 879 of file ahAlgo.cc.

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

◆ TEST() [51/77]

TEST ( Mismatch  ,
NoMismatch   
)

Definition at line 890 of file ahAlgo.cc.

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

◆ TEST() [52/77]

TEST ( PartialSum  ,
CumulativeSum   
)

◆ TEST() [53/77]

TEST ( PartialSum  ,
CustomOperation   
)

◆ TEST() [54/77]

TEST ( PartialSum  ,
EmptyRange   
)

◆ TEST() [55/77]

TEST ( Remove  ,
RemoveValue   
)

Definition at line 791 of file ahAlgo.cc.

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

◆ TEST() [56/77]

TEST ( RemoveCopyIf  ,
BasicCopy   
)

Definition at line 806 of file ahAlgo.cc.

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

◆ TEST() [57/77]

TEST ( RemoveIf  ,
RemoveEvenNumbers   
)

Definition at line 778 of file ahAlgo.cc.

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

◆ TEST() [58/77]

TEST ( Replace  ,
ReplaceValue   
)

Definition at line 405 of file ahAlgo.cc.

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

◆ TEST() [59/77]

TEST ( ReplaceCopyIf  ,
BasicReplaceCopy   
)

◆ TEST() [60/77]

TEST ( ReplaceIf  ,
ReplaceEvenNumbers   
)

Definition at line 391 of file ahAlgo.cc.

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

◆ TEST() [61/77]

TEST ( Reverse  ,
ReverseElements   
)

Definition at line 441 of file ahAlgo.cc.

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

◆ TEST() [62/77]

TEST ( Reverse  ,
ReverseEmpty   
)

Definition at line 463 of file ahAlgo.cc.

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

◆ TEST() [63/77]

TEST ( Reverse  ,
ReverseSingleElement   
)

Definition at line 454 of file ahAlgo.cc.

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

◆ TEST() [64/77]

TEST ( ReverseCopy  ,
BasicReverseCopy   
)

◆ TEST() [65/77]

TEST ( Rotate  ,
RotateElements   
)

Definition at line 491 of file ahAlgo.cc.

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

◆ TEST() [66/77]

TEST ( Search  ,
FindSubsequence   
)

Definition at line 904 of file ahAlgo.cc.

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

◆ TEST() [67/77]

TEST ( Search  ,
SubsequenceNotFound   
)

Definition at line 915 of file ahAlgo.cc.

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

◆ TEST() [68/77]

TEST ( SearchN  ,
FindConsecutive   
)

Definition at line 158 of file ahAlgo.cc.

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

◆ TEST() [69/77]

TEST ( SearchN  ,
NotEnoughConsecutive   
)

Definition at line 166 of file ahAlgo.cc.

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

◆ TEST() [70/77]

TEST ( SearchN  ,
ZeroCount   
)

Definition at line 173 of file ahAlgo.cc.

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

◆ TEST() [71/77]

TEST ( SwapRanges  ,
BasicSwap   
)

Definition at line 315 of file ahAlgo.cc.

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

◆ TEST() [72/77]

TEST ( Transform  ,
BinaryTransform   
)

◆ TEST() [73/77]

TEST ( Transform  ,
UnaryTransform   
)

◆ TEST() [74/77]

TEST ( Unique  ,
NoDuplicates   
)

Definition at line 766 of file ahAlgo.cc.

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

◆ TEST() [75/77]

TEST ( Unique  ,
RemoveDuplicates   
)

Definition at line 754 of file ahAlgo.cc.

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

◆ TEST() [76/77]

TEST ( UniqueCopy  ,
BasicCopy   
)

Definition at line 827 of file ahAlgo.cc.

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

◆ TEST() [77/77]

TEST ( UpperBound  ,
FindPosition   
)

Definition at line 524 of file ahAlgo.cc.

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