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

Comprehensive tests for Random_Set and shuffle functions. More...

#include <gtest/gtest.h>
#include <tpl_random_queue.H>
#include <tpl_dynDlist.H>
#include <set>
#include <map>
#include <algorithm>
#include <thread>
#include <chrono>
Include dependency graph for tpl_random_queue_test.cc:

Go to the source code of this file.

Classes

class  RandomSetTest
 

Functions

 TEST_F (RandomSetTest, InitiallyEmpty)
 
 TEST_F (RandomSetTest, PutAndSize)
 
 TEST_F (RandomSetTest, GetReducesSize)
 
 TEST_F (RandomSetTest, GetReturnsInsertedElements)
 
 TEST_F (RandomSetTest, GetFromEmptyThrows)
 
 TEST_F (RandomSetTest, PickDoesNotRemove)
 
 TEST_F (RandomSetTest, PickFromEmptyThrows)
 
 TEST_F (RandomSetTest, AppendInsertsElement)
 
 TEST_F (RandomSetTest, AppendReturnsReference)
 
 TEST_F (RandomSetTest, CopyConstructor)
 
 TEST_F (RandomSetTest, MoveConstructor)
 
 TEST_F (RandomSetTest, CopyAssignment)
 
 TEST_F (RandomSetTest, MoveAssignment)
 
 TEST (RandomSetConstructors, InitializerList)
 
 TEST (RandomSetConstructors, FromDynList)
 
 TEST (RandomSetConstructors, FromIteratorRange)
 
 TEST (RandomSetRandomness, GetIsRandomWithDifferentSeeds)
 
 TEST (RandomSetRandomness, SetSeedProducesReproducibleResults)
 
 TEST_F (RandomSetTest, TraverseAllElements)
 
 TEST_F (RandomSetTest, TraverseEarlyTermination)
 
 TEST (ShuffleFunction, ShufflesDynList)
 
 TEST (ShuffleFunction, ShuffleProducesPermutation)
 
 TEST (RandomSetMoveSemantics, PutWithMove)
 
 TEST (RandomSetMoveSemantics, AppendWithMove)
 
 TEST (RandomSetStress, ManyElements)
 
 TEST (RandomSetStress, ManyPutGetCycles)
 
 TEST_F (RandomSetTest, SingleElement)
 
 TEST_F (RandomSetTest, DuplicateElements)
 
int main (int argc, char **argv)
 

Detailed Description

Comprehensive tests for Random_Set and shuffle functions.

Definition in file tpl_random_queue_test.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 471 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST() [1/11]

TEST ( RandomSetConstructors  ,
FromDynList   
)

◆ TEST() [2/11]

TEST ( RandomSetConstructors  ,
FromIteratorRange   
)

◆ TEST() [3/11]

TEST ( RandomSetConstructors  ,
InitializerList   
)

◆ TEST() [4/11]

TEST ( RandomSetMoveSemantics  ,
AppendWithMove   
)

◆ TEST() [5/11]

TEST ( RandomSetMoveSemantics  ,
PutWithMove   
)

◆ TEST() [6/11]

TEST ( RandomSetRandomness  ,
GetIsRandomWithDifferentSeeds   
)

◆ TEST() [7/11]

TEST ( RandomSetRandomness  ,
SetSeedProducesReproducibleResults   
)

◆ TEST() [8/11]

◆ TEST() [9/11]

TEST ( RandomSetStress  ,
ManyPutGetCycles   
)

◆ TEST() [10/11]

TEST ( ShuffleFunction  ,
ShuffleProducesPermutation   
)

◆ TEST() [11/11]

◆ TEST_F() [1/17]

TEST_F ( RandomSetTest  ,
AppendInsertsElement   
)

Definition at line 131 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST_F() [2/17]

TEST_F ( RandomSetTest  ,
AppendReturnsReference   
)

Definition at line 141 of file tpl_random_queue_test.cc.

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

◆ TEST_F() [3/17]

TEST_F ( RandomSetTest  ,
CopyAssignment   
)

◆ TEST_F() [4/17]

TEST_F ( RandomSetTest  ,
CopyConstructor   
)

◆ TEST_F() [5/17]

TEST_F ( RandomSetTest  ,
DuplicateElements   
)

Definition at line 452 of file tpl_random_queue_test.cc.

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

◆ TEST_F() [6/17]

TEST_F ( RandomSetTest  ,
GetFromEmptyThrows   
)

Definition at line 104 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST_F() [7/17]

TEST_F ( RandomSetTest  ,
GetReducesSize   
)

Definition at line 76 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST_F() [8/17]

TEST_F ( RandomSetTest  ,
GetReturnsInsertedElements   
)

◆ TEST_F() [9/17]

TEST_F ( RandomSetTest  ,
InitiallyEmpty   
)

Definition at line 59 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST_F() [10/17]

TEST_F ( RandomSetTest  ,
MoveAssignment   
)

Definition at line 196 of file tpl_random_queue_test.cc.

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

◆ TEST_F() [11/17]

TEST_F ( RandomSetTest  ,
MoveConstructor   
)

Definition at line 172 of file tpl_random_queue_test.cc.

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

◆ TEST_F() [12/17]

TEST_F ( RandomSetTest  ,
PickDoesNotRemove   
)

Definition at line 109 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST_F() [13/17]

TEST_F ( RandomSetTest  ,
PickFromEmptyThrows   
)

Definition at line 122 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST_F() [14/17]

TEST_F ( RandomSetTest  ,
PutAndSize   
)

Definition at line 65 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST_F() [15/17]

TEST_F ( RandomSetTest  ,
SingleElement   
)

Definition at line 444 of file tpl_random_queue_test.cc.

References Aleph::maps().

◆ TEST_F() [16/17]

TEST_F ( RandomSetTest  ,
TraverseAllElements   
)

◆ TEST_F() [17/17]

TEST_F ( RandomSetTest  ,
TraverseEarlyTermination   
)

Definition at line 319 of file tpl_random_queue_test.cc.

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