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

Tests for Ah Stl Zip. More...

#include <gtest/gtest.h>
#include <ah-stl-zip.H>
#include <vector>
#include <list>
#include <set>
#include <deque>
#include <array>
#include <string>
#include <numeric>
Include dependency graph for ah-stl-zip_test.cc:

Go to the source code of this file.

Classes

class  StlZipViewTest
 

Functions

 TEST_F (StlZipViewTest, BasicIteration)
 
 TEST_F (StlZipViewTest, ThreeContainers)
 
 TEST_F (StlZipViewTest, DifferentLengths_StopsAtShortest)
 
 TEST_F (StlZipViewTest, EmptyContainer)
 
 TEST_F (StlZipViewTest, SingleElement)
 
 TEST_F (StlZipViewTest, ViewSize)
 
 TEST_F (StlZipViewTest, ViewEmpty)
 
 TEST (StlZipContainerTypes, VectorAndList)
 
 TEST (StlZipContainerTypes, VectorAndSet)
 
 TEST (StlZipContainerTypes, VectorAndDeque)
 
 TEST (StlZipContainerTypes, StdArray)
 
 TEST (StlZipContainerTypes, ManyContainers)
 
 TEST (StlZipAll, AllTrue)
 
 TEST (StlZipAll, SomeFalse)
 
 TEST (StlZipAll, EmptyContainers)
 
 TEST (StlZipAll, EqualLengthCheck)
 
 TEST (StlZipExists, Found)
 
 TEST (StlZipExists, NotFound)
 
 TEST (StlZipExists, EmptyContainers)
 
 TEST (StlZipAny, AliasWorks)
 
 TEST (StlZipNone, AllFalse)
 
 TEST (StlZipForEach, BasicForEach)
 
 TEST (StlZipForEach, WithIndex)
 
 TEST (StlZipFoldl, SumProducts)
 
 TEST (StlZipFoldl, ConcatStrings)
 
 TEST (StlZipReduce, AliasWorks)
 
 TEST (StlZipMap, BasicMap)
 
 TEST (StlZipMap, DifferentReturnType)
 
 TEST (StlZipFilter, BasicFilter)
 
 TEST (StlZipFilter, NoMatches)
 
 TEST (StlZipFindFirst, Found)
 
 TEST (StlZipFindFirst, NotFound)
 
 TEST (StlZipCount, CountMatches)
 
 TEST (StlZipLength, BasicLength)
 
 TEST (StlZipEqualLength, EqualLengths)
 
 TEST (StlZipEqualLength, DifferentLengths)
 
 TEST (StlZipNth, ValidIndex)
 
 TEST (StlZipNth, InvalidIndex)
 
 TEST (StlZipTake, TakeFirst)
 
 TEST (StlZipTake, TakeMoreThanAvailable)
 
 TEST (StlZipDrop, DropFirst)
 
 TEST (StlZipDrop, DropAll)
 
 TEST (StlZipPartition, BasicPartition)
 
 TEST (StlZipToVector, Materialize)
 
 TEST (StlZipTraverse, AllTrue)
 
 TEST (StlZipTraverse, StopsEarly)
 
 TEST (StlZipCmp, AllEqual)
 
 TEST (StlZipCmp, NotAllEqual)
 
 TEST (StlZipEdgeCases, BothEmpty)
 
 TEST (StlZipEdgeCases, OneEmpty)
 
 TEST (StlZipEdgeCases, VeryLongContainers)
 
 TEST (StlEnumerate, Basic)
 
 TEST (StlEnumerate, Empty)
 
 TEST (StlZipTakeWhile, Basic)
 
 TEST (StlZipTakeWhile, TakeNone)
 
 TEST (StlZipDropWhile, Basic)
 
 TEST (StlZipDropWhile, DropAll)
 
 TEST (StlZipFirst, Basic)
 
 TEST (StlZipFirst, Empty)
 
 TEST (StlZipLast, Basic)
 
 TEST (StlZipFindLast, Basic)
 
 TEST (StlZipFindIndex, Found)
 
 TEST (StlZipFindIndex, NotFound)
 
 TEST (StlUnzip, Pairs)
 
 TEST (StlUnzipTuple, Basic)
 
 TEST (StlAdjacent, Basic)
 
 TEST (StlAdjacent, SingleElement)
 
 TEST (StlAdjacent, Empty)
 
 TEST (StlAdjacentMap, Differences)
 
 TEST (StlAdjacentAll, Sorted)
 
 TEST (StlAdjacentExists, HasDuplicate)
 
 TEST (StlZipMapi, Basic)
 
 TEST (StlZipFilteri, EvenIndices)
 
 TEST (StlZipScanLeft, RunningSum)
 
 TEST (StlZipScanLeft, RunningProduct)
 
 TEST (StlZipFindMapi, Found)
 
 TEST (StlZipFindMapi, NotFound)
 
 TEST (StlZipEqual, SameLength)
 
 TEST (StlZipEqual, DifferentLength)
 
 TEST (StlZipEqualBy, AllMatch)
 
 TEST (StlZipMem, Found)
 
 TEST (StlZipAssoc, Found)
 
 TEST (StlZipAssoc, NotFound)
 
 TEST (StlZipMin, Basic)
 
 TEST (StlZipMax, Basic)
 
 TEST (StlZipMinMax, Basic)
 
 TEST (StlZipMinMax, Empty)
 
int main (int argc, char **argv)
 

Detailed Description

Tests for Ah Stl Zip.

Definition in file ah-stl-zip_test.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1236 of file ah-stl-zip_test.cc.

References Aleph::maps().

◆ TEST() [1/80]

TEST ( StlAdjacent  ,
Basic   
)

Definition at line 975 of file ah-stl-zip_test.cc.

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

◆ TEST() [2/80]

TEST ( StlAdjacent  ,
Empty   
)

Definition at line 997 of file ah-stl-zip_test.cc.

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

◆ TEST() [3/80]

TEST ( StlAdjacent  ,
SingleElement   
)

Definition at line 988 of file ah-stl-zip_test.cc.

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

◆ TEST() [4/80]

TEST ( StlAdjacentAll  ,
Sorted   
)

Definition at line 1018 of file ah-stl-zip_test.cc.

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

◆ TEST() [5/80]

TEST ( StlAdjacentExists  ,
HasDuplicate   
)

Definition at line 1027 of file ah-stl-zip_test.cc.

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

◆ TEST() [6/80]

TEST ( StlAdjacentMap  ,
Differences   
)

◆ TEST() [7/80]

TEST ( StlEnumerate  ,
Basic   
)

Definition at line 775 of file ah-stl-zip_test.cc.

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

◆ TEST() [8/80]

TEST ( StlEnumerate  ,
Empty   
)

Definition at line 795 of file ah-stl-zip_test.cc.

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

◆ TEST() [9/80]

TEST ( StlUnzip  ,
Pairs   
)

Definition at line 943 of file ah-stl-zip_test.cc.

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

◆ TEST() [10/80]

TEST ( StlUnzipTuple  ,
Basic   
)

◆ TEST() [11/80]

TEST ( StlZipAll  ,
AllTrue   
)

Definition at line 245 of file ah-stl-zip_test.cc.

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

◆ TEST() [12/80]

TEST ( StlZipAll  ,
EmptyContainers   
)

Definition at line 269 of file ah-stl-zip_test.cc.

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

◆ TEST() [13/80]

TEST ( StlZipAll  ,
EqualLengthCheck   
)

Definition at line 278 of file ah-stl-zip_test.cc.

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

◆ TEST() [14/80]

TEST ( StlZipAll  ,
SomeFalse   
)

Definition at line 257 of file ah-stl-zip_test.cc.

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

◆ TEST() [15/80]

TEST ( StlZipAny  ,
AliasWorks   
)

Definition at line 332 of file ah-stl-zip_test.cc.

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

◆ TEST() [16/80]

TEST ( StlZipAssoc  ,
Found   
)

Definition at line 1169 of file ah-stl-zip_test.cc.

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

◆ TEST() [17/80]

TEST ( StlZipAssoc  ,
NotFound   
)

Definition at line 1181 of file ah-stl-zip_test.cc.

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

◆ TEST() [18/80]

TEST ( StlZipCmp  ,
AllEqual   
)

Definition at line 710 of file ah-stl-zip_test.cc.

References Aleph::maps(), Aleph::stl_zip_cmp(), and y.

◆ TEST() [19/80]

TEST ( StlZipCmp  ,
NotAllEqual   
)

Definition at line 721 of file ah-stl-zip_test.cc.

References Aleph::maps(), Aleph::stl_zip_cmp(), and y.

◆ TEST() [20/80]

TEST ( StlZipContainerTypes  ,
ManyContainers   
)

Definition at line 219 of file ah-stl-zip_test.cc.

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

◆ TEST() [21/80]

TEST ( StlZipContainerTypes  ,
StdArray   
)

Definition at line 204 of file ah-stl-zip_test.cc.

References Aleph::maps(), Aleph::HTList::size(), Aleph::stl_zip(), and y.

◆ TEST() [22/80]

TEST ( StlZipContainerTypes  ,
VectorAndDeque   
)

Definition at line 189 of file ah-stl-zip_test.cc.

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

◆ TEST() [23/80]

TEST ( StlZipContainerTypes  ,
VectorAndList   
)

Definition at line 160 of file ah-stl-zip_test.cc.

References l, Aleph::maps(), Aleph::HTList::size(), and Aleph::stl_zip().

◆ TEST() [24/80]

TEST ( StlZipContainerTypes  ,
VectorAndSet   
)

Definition at line 175 of file ah-stl-zip_test.cc.

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

◆ TEST() [25/80]

TEST ( StlZipCount  ,
CountMatches   
)

Definition at line 529 of file ah-stl-zip_test.cc.

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

◆ TEST() [26/80]

TEST ( StlZipDrop  ,
DropAll   
)

Definition at line 632 of file ah-stl-zip_test.cc.

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

◆ TEST() [27/80]

TEST ( StlZipDrop  ,
DropFirst   
)

Definition at line 620 of file ah-stl-zip_test.cc.

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

◆ TEST() [28/80]

TEST ( StlZipDropWhile  ,
Basic   
)

Definition at line 840 of file ah-stl-zip_test.cc.

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

◆ TEST() [29/80]

TEST ( StlZipDropWhile  ,
DropAll   
)

Definition at line 853 of file ah-stl-zip_test.cc.

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

◆ TEST() [30/80]

TEST ( StlZipEdgeCases  ,
BothEmpty   
)

◆ TEST() [31/80]

TEST ( StlZipEdgeCases  ,
OneEmpty   
)

Definition at line 745 of file ah-stl-zip_test.cc.

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

◆ TEST() [32/80]

TEST ( StlZipEdgeCases  ,
VeryLongContainers   
)

◆ TEST() [33/80]

TEST ( StlZipEqual  ,
DifferentLength   
)

Definition at line 1140 of file ah-stl-zip_test.cc.

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

◆ TEST() [34/80]

TEST ( StlZipEqual  ,
SameLength   
)

Definition at line 1132 of file ah-stl-zip_test.cc.

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

◆ TEST() [35/80]

TEST ( StlZipEqualBy  ,
AllMatch   
)

Definition at line 1148 of file ah-stl-zip_test.cc.

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

◆ TEST() [36/80]

TEST ( StlZipEqualLength  ,
DifferentLengths   
)

Definition at line 560 of file ah-stl-zip_test.cc.

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

◆ TEST() [37/80]

TEST ( StlZipEqualLength  ,
EqualLengths   
)

Definition at line 552 of file ah-stl-zip_test.cc.

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

◆ TEST() [38/80]

TEST ( StlZipExists  ,
EmptyContainers   
)

Definition at line 323 of file ah-stl-zip_test.cc.

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

◆ TEST() [39/80]

TEST ( StlZipExists  ,
Found   
)

Definition at line 299 of file ah-stl-zip_test.cc.

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

◆ TEST() [40/80]

TEST ( StlZipExists  ,
NotFound   
)

Definition at line 311 of file ah-stl-zip_test.cc.

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

◆ TEST() [41/80]

TEST ( StlZipFilter  ,
BasicFilter   
)

Definition at line 471 of file ah-stl-zip_test.cc.

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

◆ TEST() [42/80]

TEST ( StlZipFilter  ,
NoMatches   
)

Definition at line 483 of file ah-stl-zip_test.cc.

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

◆ TEST() [43/80]

TEST ( StlZipFilteri  ,
EvenIndices   
)

◆ TEST() [44/80]

TEST ( StlZipFindFirst  ,
Found   
)

Definition at line 499 of file ah-stl-zip_test.cc.

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

◆ TEST() [45/80]

TEST ( StlZipFindFirst  ,
NotFound   
)

Definition at line 513 of file ah-stl-zip_test.cc.

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

◆ TEST() [46/80]

TEST ( StlZipFindIndex  ,
Found   
)

Definition at line 915 of file ah-stl-zip_test.cc.

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

◆ TEST() [47/80]

TEST ( StlZipFindIndex  ,
NotFound   
)

Definition at line 927 of file ah-stl-zip_test.cc.

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

◆ TEST() [48/80]

TEST ( StlZipFindLast  ,
Basic   
)

Definition at line 902 of file ah-stl-zip_test.cc.

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

◆ TEST() [49/80]

TEST ( StlZipFindMapi  ,
Found   
)

Definition at line 1103 of file ah-stl-zip_test.cc.

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

◆ TEST() [50/80]

TEST ( StlZipFindMapi  ,
NotFound   
)

Definition at line 1118 of file ah-stl-zip_test.cc.

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

◆ TEST() [51/80]

TEST ( StlZipFirst  ,
Basic   
)

Definition at line 869 of file ah-stl-zip_test.cc.

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

◆ TEST() [52/80]

TEST ( StlZipFirst  ,
Empty   
)

Definition at line 881 of file ah-stl-zip_test.cc.

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

◆ TEST() [53/80]

TEST ( StlZipFoldl  ,
ConcatStrings   
)

Definition at line 409 of file ah-stl-zip_test.cc.

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

◆ TEST() [54/80]

TEST ( StlZipFoldl  ,
SumProducts   
)

Definition at line 396 of file ah-stl-zip_test.cc.

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

◆ TEST() [55/80]

TEST ( StlZipForEach  ,
BasicForEach   
)

◆ TEST() [56/80]

TEST ( StlZipForEach  ,
WithIndex   
)

◆ TEST() [57/80]

TEST ( StlZipLast  ,
Basic   
)

Definition at line 890 of file ah-stl-zip_test.cc.

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

◆ TEST() [58/80]

TEST ( StlZipLength  ,
BasicLength   
)

Definition at line 541 of file ah-stl-zip_test.cc.

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

◆ TEST() [59/80]

TEST ( StlZipMap  ,
BasicMap   
)

Definition at line 437 of file ah-stl-zip_test.cc.

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

◆ TEST() [60/80]

TEST ( StlZipMap  ,
DifferentReturnType   
)

Definition at line 452 of file ah-stl-zip_test.cc.

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

◆ TEST() [61/80]

TEST ( StlZipMapi  ,
Basic   
)

Definition at line 1040 of file ah-stl-zip_test.cc.

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

◆ TEST() [62/80]

TEST ( StlZipMax  ,
Basic   
)

Definition at line 1202 of file ah-stl-zip_test.cc.

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

◆ TEST() [63/80]

TEST ( StlZipMem  ,
Found   
)

Definition at line 1160 of file ah-stl-zip_test.cc.

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

◆ TEST() [64/80]

TEST ( StlZipMin  ,
Basic   
)

Definition at line 1191 of file ah-stl-zip_test.cc.

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

◆ TEST() [65/80]

TEST ( StlZipMinMax  ,
Basic   
)

Definition at line 1213 of file ah-stl-zip_test.cc.

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

◆ TEST() [66/80]

TEST ( StlZipMinMax  ,
Empty   
)

Definition at line 1225 of file ah-stl-zip_test.cc.

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

◆ TEST() [67/80]

TEST ( StlZipNone  ,
AllFalse   
)

Definition at line 344 of file ah-stl-zip_test.cc.

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

◆ TEST() [68/80]

TEST ( StlZipNth  ,
InvalidIndex   
)

Definition at line 584 of file ah-stl-zip_test.cc.

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

◆ TEST() [69/80]

TEST ( StlZipNth  ,
ValidIndex   
)

Definition at line 572 of file ah-stl-zip_test.cc.

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

◆ TEST() [70/80]

TEST ( StlZipPartition  ,
BasicPartition   
)

◆ TEST() [71/80]

TEST ( StlZipReduce  ,
AliasWorks   
)

Definition at line 421 of file ah-stl-zip_test.cc.

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

◆ TEST() [72/80]

TEST ( StlZipScanLeft  ,
RunningProduct   
)

◆ TEST() [73/80]

TEST ( StlZipScanLeft  ,
RunningSum   
)

◆ TEST() [74/80]

TEST ( StlZipTake  ,
TakeFirst   
)

Definition at line 598 of file ah-stl-zip_test.cc.

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

◆ TEST() [75/80]

TEST ( StlZipTake  ,
TakeMoreThanAvailable   
)

Definition at line 610 of file ah-stl-zip_test.cc.

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

◆ TEST() [76/80]

TEST ( StlZipTakeWhile  ,
Basic   
)

Definition at line 814 of file ah-stl-zip_test.cc.

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

◆ TEST() [77/80]

TEST ( StlZipTakeWhile  ,
TakeNone   
)

Definition at line 828 of file ah-stl-zip_test.cc.

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

◆ TEST() [78/80]

TEST ( StlZipToVector  ,
Materialize   
)

Definition at line 663 of file ah-stl-zip_test.cc.

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

◆ TEST() [79/80]

TEST ( StlZipTraverse  ,
AllTrue   
)

Definition at line 679 of file ah-stl-zip_test.cc.

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

◆ TEST() [80/80]

TEST ( StlZipTraverse  ,
StopsEarly   
)

Definition at line 691 of file ah-stl-zip_test.cc.

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

◆ TEST_F() [1/7]

TEST_F ( StlZipViewTest  ,
BasicIteration   
)

Definition at line 73 of file ah-stl-zip_test.cc.

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

◆ TEST_F() [2/7]

TEST_F ( StlZipViewTest  ,
DifferentLengths_StopsAtShortest   
)

Definition at line 97 of file ah-stl-zip_test.cc.

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

◆ TEST_F() [3/7]

TEST_F ( StlZipViewTest  ,
EmptyContainer   
)

Definition at line 111 of file ah-stl-zip_test.cc.

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

◆ TEST_F() [4/7]

TEST_F ( StlZipViewTest  ,
SingleElement   
)

Definition at line 125 of file ah-stl-zip_test.cc.

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

◆ TEST_F() [5/7]

TEST_F ( StlZipViewTest  ,
ThreeContainers   
)

Definition at line 85 of file ah-stl-zip_test.cc.

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

◆ TEST_F() [6/7]

TEST_F ( StlZipViewTest  ,
ViewEmpty   
)

Definition at line 146 of file ah-stl-zip_test.cc.

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

◆ TEST_F() [7/7]

TEST_F ( StlZipViewTest  ,
ViewSize   
)

Definition at line 140 of file ah-stl-zip_test.cc.

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