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

Exhaustive test suite for DynListQueue<T> More...

#include <gtest/gtest.h>
#include <string>
#include <memory>
#include <vector>
#include <stdexcept>
#include <tpl_dynListQueue.H>
#include <ahFunctional.H>
#include <ah-zip.H>
Include dependency graph for tpl_dynListQueue.cc:

Go to the source code of this file.

Classes

class  DynListQueueTest
 
struct  NonCopyable
 
struct  ThrowingType
 

Functions

 TEST_F (DynListQueueTest, DefaultConstruction)
 
 TEST_F (DynListQueueTest, CopyConstruction)
 
 TEST_F (DynListQueueTest, MoveConstruction)
 
 TEST_F (DynListQueueTest, InitializerListConstruction)
 
 TEST_F (DynListQueueTest, IteratorRangeConstruction)
 
 TEST_F (DynListQueueTest, DynListConstruction)
 
 TEST_F (DynListQueueTest, CopyAssignment)
 
 TEST_F (DynListQueueTest, CopyAssignmentSelf)
 
 TEST_F (DynListQueueTest, MoveAssignment)
 
 TEST_F (DynListQueueTest, PutByCopy)
 
 TEST_F (DynListQueueTest, PutByMove)
 
 TEST_F (DynListQueueTest, AppendAndInsertAliases)
 
 TEST_F (DynListQueueTest, GetFIFOOrder)
 
 TEST_F (DynListQueueTest, GetFromEmptyQueue)
 
 TEST_F (DynListQueueTest, FrontPeek)
 
 TEST_F (DynListQueueTest, FrontFromEmptyQueue)
 
 TEST_F (DynListQueueTest, RearPeek)
 
 TEST_F (DynListQueueTest, RearFromEmptyQueue)
 
 TEST_F (DynListQueueTest, FrontModification)
 
 TEST_F (DynListQueueTest, RearModification)
 
 TEST_F (DynListQueueTest, SizeTracking)
 
 TEST_F (DynListQueueTest, IsEmptyCheck)
 
 TEST_F (DynListQueueTest, EmptyOperation)
 
 TEST_F (DynListQueueTest, EmptyOnEmptyQueue)
 
 TEST_F (DynListQueueTest, SwapQueues)
 
 TEST_F (DynListQueueTest, SwapWithEmpty)
 
 TEST_F (DynListQueueTest, SwapSelf)
 
 TEST_F (DynListQueueTest, IteratorBasic)
 
 TEST_F (DynListQueueTest, IteratorTraversalOrder)
 
 TEST_F (DynListQueueTest, STLIteratorRangeFor)
 
 TEST_F (DynListQueueTest, STLIteratorBeginEnd)
 
 TEST_F (DynListQueueTest, STLConstIterator)
 
 TEST_F (DynListQueueTest, EmptyQueueIterator)
 
 TEST_F (DynListQueueTest, TraverseAll)
 
 TEST_F (DynListQueueTest, TraverseEarlyStop)
 
 TEST_F (DynListQueueTest, TraverseEmptyQueue)
 
 TEST_F (DynListQueueTest, TraverseConst)
 
 TEST_F (DynListQueueTest, ForEach)
 
 TEST_F (DynListQueueTest, Maps)
 
 TEST_F (DynListQueueTest, Filter)
 
 TEST_F (DynListQueueTest, Foldl)
 
 TEST_F (DynListQueueTest, All)
 
 TEST_F (DynListQueueTest, Exists)
 
 TEST_F (DynListQueueTest, Partition)
 
 TEST_F (DynListQueueTest, Take)
 
 TEST_F (DynListQueueTest, Drop)
 
 TEST_F (DynListQueueTest, Rev)
 
 TEST_F (DynListQueueTest, Length)
 
 TEST_F (DynListQueueTest, FindPtr)
 
 TEST_F (DynListQueueTest, FindPtrNotFound)
 
 TEST_F (DynListQueueTest, FindIndex)
 
 TEST_F (DynListQueueTest, FindItem)
 
 TEST_F (DynListQueueTest, Nth)
 
 TEST_F (DynListQueueTest, NthOutOfRange)
 
 TEST_F (DynListQueueTest, GetIt)
 
 TEST_F (DynListQueueTest, GetItPosition)
 
 TEST_F (DynListQueueTest, Keys)
 
 TEST_F (DynListQueueTest, Items)
 
 TEST_F (DynListQueueTest, TypeAliases)
 
 TEST (DynListQueueComplexTypes, StringQueue)
 
 TEST (DynListQueueComplexTypes, UniquePtr)
 
 TEST (DynListQueueComplexTypes, MoveOnlyType)
 
 TEST (DynListQueueComplexTypes, ExceptionSafety)
 
 TEST (DynListQueueStress, LargeQueue)
 
 TEST (DynListQueueStress, InterleavedOperations)
 
 TEST (DynListQueueStress, RepeatedEmptyFill)
 
 TEST (DynListQueueEdgeCases, SingleElement)
 
 TEST (DynListQueueEdgeCases, AlternatingEmptyNonEmpty)
 
 TEST (DynListQueueEdgeCases, ZeroValue)
 
 TEST (DynListQueueEdgeCases, NegativeValues)
 
 TEST (DynListQueueEdgeCases, EmptyString)
 
 TEST (DynListQueueNoexcept, SwapIsNoexcept)
 
 TEST (DynListQueueNoexcept, SizeIsNoexcept)
 
 TEST (DynListQueueNoexcept, IsEmptyIsNoexcept)
 
 TEST (DynListQueueNoexcept, EmptyIsNoexcept)
 
 TEST (DynListQueueNoexcept, MoveConstructorIsNoexcept)
 
 TEST (DynListQueueNoexcept, MoveAssignmentIsNoexcept)
 
 TEST (DynListQueueEmplace, EmplaceBasic)
 
 TEST (DynListQueueEmplace, EmplaceReturnsReference)
 
 TEST (DynListQueueEmplace, EmplaceWithString)
 
 TEST (DynListQueueAliases, PopAlias)
 
 TEST (DynListQueueAliases, PopFromEmpty)
 
 TEST (DynListQueueAliases, ClearAlias)
 
 TEST (DynListQueueAliases, ClearOnEmpty)
 
 TEST (DynListQueueAliases, ClearIsNoexcept)
 
 TEST (DynListQueueMemory, DestructorFreesMemory)
 
 TEST (DynListQueueMemory, EmptyFreesMemory)
 
 TEST (DynListQueueConstCorrectness, ConstFrontReturnsConstReference)
 
 TEST (DynListQueueConstCorrectness, NonConstFrontReturnsModifiableReference)
 
 TEST (DynListQueueConstCorrectness, ConstRearReturnsConstReference)
 
 TEST (DynListQueueConstCorrectness, NonConstRearReturnsModifiableReference)
 
 TEST (DynListQueueEquality, EqualQueuesAreEqual)
 
 TEST (DynListQueueEquality, DifferentSizesAreNotEqual)
 
 TEST (DynListQueueEquality, DifferentElementsAreNotEqual)
 
 TEST (DynListQueueEquality, EmptyQueuesAreEqual)
 
 TEST (DynListQueueEquality, SelfEquality)
 
 TEST (DynListQueueEquality, EmptyVsNonEmpty)
 
 TEST (DynListQueueSearch, SearchExistingElement)
 
 TEST (DynListQueueSearch, SearchNonExistingElement)
 
 TEST (DynListQueueSearch, SearchInEmptyQueue)
 
 TEST (DynListQueueSearch, SearchFirstElement)
 
 TEST (DynListQueueSearch, SearchLastElement)
 
 TEST (DynListQueueSearch, ConstSearch)
 
 TEST (DynListQueueSearch, SearchDuplicates)
 
int main (int argc, char **argv)
 

Detailed Description

Exhaustive test suite for DynListQueue<T>

This file contains comprehensive tests for the DynListQueue class, covering all public methods, edge cases, exception handling, and iterator functionality.

Definition in file tpl_dynListQueue.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1334 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST() [1/45]

◆ TEST() [2/45]

TEST ( DynListQueueAliases  ,
ClearIsNoexcept   
)

Definition at line 1104 of file tpl_dynListQueue.cc.

References Aleph::DynListQueue< T >::clear().

◆ TEST() [3/45]

TEST ( DynListQueueAliases  ,
ClearOnEmpty   
)

◆ TEST() [4/45]

TEST ( DynListQueueAliases  ,
PopAlias   
)

◆ TEST() [5/45]

TEST ( DynListQueueAliases  ,
PopFromEmpty   
)

◆ TEST() [6/45]

TEST ( DynListQueueComplexTypes  ,
ExceptionSafety   
)

◆ TEST() [7/45]

TEST ( DynListQueueComplexTypes  ,
MoveOnlyType   
)

◆ TEST() [8/45]

TEST ( DynListQueueComplexTypes  ,
StringQueue   
)

◆ TEST() [9/45]

TEST ( DynListQueueComplexTypes  ,
UniquePtr   
)

◆ TEST() [10/45]

TEST ( DynListQueueConstCorrectness  ,
ConstFrontReturnsConstReference   
)

◆ TEST() [11/45]

TEST ( DynListQueueConstCorrectness  ,
ConstRearReturnsConstReference   
)

◆ TEST() [12/45]

TEST ( DynListQueueConstCorrectness  ,
NonConstFrontReturnsModifiableReference   
)

◆ TEST() [13/45]

TEST ( DynListQueueConstCorrectness  ,
NonConstRearReturnsModifiableReference   
)

◆ TEST() [14/45]

◆ TEST() [15/45]

TEST ( DynListQueueEdgeCases  ,
EmptyString   
)

◆ TEST() [16/45]

TEST ( DynListQueueEdgeCases  ,
NegativeValues   
)

◆ TEST() [17/45]

◆ TEST() [18/45]

◆ TEST() [19/45]

◆ TEST() [20/45]

TEST ( DynListQueueEmplace  ,
EmplaceReturnsReference   
)

◆ TEST() [21/45]

TEST ( DynListQueueEmplace  ,
EmplaceWithString   
)

◆ TEST() [22/45]

TEST ( DynListQueueEquality  ,
DifferentElementsAreNotEqual   
)

Definition at line 1220 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::eq().

◆ TEST() [23/45]

TEST ( DynListQueueEquality  ,
DifferentSizesAreNotEqual   
)

Definition at line 1209 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::eq().

◆ TEST() [24/45]

TEST ( DynListQueueEquality  ,
EmptyQueuesAreEqual   
)

Definition at line 1231 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::eq().

◆ TEST() [25/45]

TEST ( DynListQueueEquality  ,
EmptyVsNonEmpty   
)

Definition at line 1253 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::eq().

◆ TEST() [26/45]

TEST ( DynListQueueEquality  ,
EqualQueuesAreEqual   
)

Definition at line 1197 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::eq().

◆ TEST() [27/45]

TEST ( DynListQueueEquality  ,
SelfEquality   
)

Definition at line 1242 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::eq().

◆ TEST() [28/45]

TEST ( DynListQueueMemory  ,
DestructorFreesMemory   
)

◆ TEST() [29/45]

◆ TEST() [30/45]

TEST ( DynListQueueNoexcept  ,
EmptyIsNoexcept   
)

Definition at line 1004 of file tpl_dynListQueue.cc.

References Aleph::DynListQueue< T >::empty().

◆ TEST() [31/45]

TEST ( DynListQueueNoexcept  ,
IsEmptyIsNoexcept   
)

Definition at line 998 of file tpl_dynListQueue.cc.

References Aleph::DynListQueue< T >::is_empty().

◆ TEST() [32/45]

TEST ( DynListQueueNoexcept  ,
MoveAssignmentIsNoexcept   
)

Definition at line 1016 of file tpl_dynListQueue.cc.

◆ TEST() [33/45]

TEST ( DynListQueueNoexcept  ,
MoveConstructorIsNoexcept   
)

Definition at line 1010 of file tpl_dynListQueue.cc.

◆ TEST() [34/45]

TEST ( DynListQueueNoexcept  ,
SizeIsNoexcept   
)

Definition at line 992 of file tpl_dynListQueue.cc.

References Aleph::DynListQueue< T >::size().

◆ TEST() [35/45]

TEST ( DynListQueueNoexcept  ,
SwapIsNoexcept   
)

◆ TEST() [36/45]

TEST ( DynListQueueSearch  ,
ConstSearch   
)

◆ TEST() [37/45]

TEST ( DynListQueueSearch  ,
SearchDuplicates   
)

◆ TEST() [38/45]

TEST ( DynListQueueSearch  ,
SearchExistingElement   
)

◆ TEST() [39/45]

TEST ( DynListQueueSearch  ,
SearchFirstElement   
)

◆ TEST() [40/45]

TEST ( DynListQueueSearch  ,
SearchInEmptyQueue   
)

◆ TEST() [41/45]

TEST ( DynListQueueSearch  ,
SearchLastElement   
)

◆ TEST() [42/45]

TEST ( DynListQueueSearch  ,
SearchNonExistingElement   
)

◆ TEST() [43/45]

◆ TEST() [44/45]

◆ TEST() [45/45]

◆ TEST_F() [1/59]

◆ TEST_F() [2/59]

◆ TEST_F() [3/59]

◆ TEST_F() [4/59]

◆ TEST_F() [5/59]

TEST_F ( DynListQueueTest  ,
CopyConstruction   
)

Definition at line 87 of file tpl_dynListQueue.cc.

References Aleph::copy(), Aleph::divide_and_conquer_partition_dp(), and N.

◆ TEST_F() [6/59]

◆ TEST_F() [7/59]

TEST_F ( DynListQueueTest  ,
Drop   
)

Definition at line 614 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and N.

◆ TEST_F() [8/59]

◆ TEST_F() [9/59]

TEST_F ( DynListQueueTest  ,
EmptyOnEmptyQueue   
)

Definition at line 357 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [10/59]

TEST_F ( DynListQueueTest  ,
EmptyOperation   
)

Definition at line 347 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and N.

◆ TEST_F() [11/59]

TEST_F ( DynListQueueTest  ,
EmptyQueueIterator   
)

◆ TEST_F() [12/59]

◆ TEST_F() [13/59]

◆ TEST_F() [14/59]

TEST_F ( DynListQueueTest  ,
FindIndex   
)

Definition at line 658 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [15/59]

TEST_F ( DynListQueueTest  ,
FindItem   
)

Definition at line 665 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [16/59]

TEST_F ( DynListQueueTest  ,
FindPtr   
)

Definition at line 643 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [17/59]

TEST_F ( DynListQueueTest  ,
FindPtrNotFound   
)

Definition at line 651 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [18/59]

◆ TEST_F() [19/59]

TEST_F ( DynListQueueTest  ,
ForEach   
)

Definition at line 542 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), N, and Aleph::sum().

◆ TEST_F() [20/59]

TEST_F ( DynListQueueTest  ,
FrontFromEmptyQueue   
)

◆ TEST_F() [21/59]

◆ TEST_F() [22/59]

TEST_F ( DynListQueueTest  ,
FrontPeek   
)

Definition at line 257 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and N.

◆ TEST_F() [23/59]

◆ TEST_F() [24/59]

TEST_F ( DynListQueueTest  ,
GetFromEmptyQueue   
)

◆ TEST_F() [25/59]

TEST_F ( DynListQueueTest  ,
GetIt   
)

Definition at line 686 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [26/59]

TEST_F ( DynListQueueTest  ,
GetItPosition   
)

Definition at line 693 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [27/59]

◆ TEST_F() [28/59]

◆ TEST_F() [29/59]

TEST_F ( DynListQueueTest  ,
Items   
)

◆ TEST_F() [30/59]

◆ TEST_F() [31/59]

TEST_F ( DynListQueueTest  ,
IteratorRangeConstruction   
)

◆ TEST_F() [32/59]

◆ TEST_F() [33/59]

◆ TEST_F() [34/59]

TEST_F ( DynListQueueTest  ,
Length   
)

Definition at line 633 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and N.

◆ TEST_F() [35/59]

◆ TEST_F() [36/59]

◆ TEST_F() [37/59]

◆ TEST_F() [38/59]

TEST_F ( DynListQueueTest  ,
Nth   
)

Definition at line 673 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and N.

◆ TEST_F() [39/59]

TEST_F ( DynListQueueTest  ,
NthOutOfRange   
)

Definition at line 680 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and N.

◆ TEST_F() [40/59]

◆ TEST_F() [41/59]

◆ TEST_F() [42/59]

◆ TEST_F() [43/59]

TEST_F ( DynListQueueTest  ,
RearFromEmptyQueue   
)

◆ TEST_F() [44/59]

◆ TEST_F() [45/59]

TEST_F ( DynListQueueTest  ,
RearPeek   
)

Definition at line 275 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and N.

◆ TEST_F() [46/59]

◆ TEST_F() [47/59]

◆ TEST_F() [48/59]

TEST_F ( DynListQueueTest  ,
STLConstIterator   
)

Definition at line 467 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::sum().

◆ TEST_F() [49/59]

◆ TEST_F() [50/59]

TEST_F ( DynListQueueTest  ,
STLIteratorRangeFor   
)

Definition at line 442 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::sum().

◆ TEST_F() [51/59]

◆ TEST_F() [52/59]

◆ TEST_F() [53/59]

◆ TEST_F() [54/59]

TEST_F ( DynListQueueTest  ,
Take   
)

Definition at line 605 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [55/59]

TEST_F ( DynListQueueTest  ,
TraverseAll   
)

Definition at line 490 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), N, and Aleph::sum().

◆ TEST_F() [56/59]

TEST_F ( DynListQueueTest  ,
TraverseConst   
)

Definition at line 525 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp(), N, and Aleph::sum().

◆ TEST_F() [57/59]

TEST_F ( DynListQueueTest  ,
TraverseEarlyStop   
)

◆ TEST_F() [58/59]

TEST_F ( DynListQueueTest  ,
TraverseEmptyQueue   
)

Definition at line 513 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().

◆ TEST_F() [59/59]

TEST_F ( DynListQueueTest  ,
TypeAliases   
)

Definition at line 726 of file tpl_dynListQueue.cc.

References Aleph::divide_and_conquer_partition_dp().