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

Comprehensive tests for DynLhashTable (dynamic hash table with chaining) More...

#include <gtest/gtest.h>
#include <tpl_dynLhash.H>
#include <string>
#include <vector>
#include <random>
Include dependency graph for tpl_dynLhash_test.cc:

Go to the source code of this file.

Classes

class  DynLhashTableTest
 
struct  ComplexValue
 

Functions

 TEST_F (DynLhashTableTest, InsertAndSearch)
 
 TEST_F (DynLhashTableTest, SearchNonExistent)
 
 TEST_F (DynLhashTableTest, InsertMultiple)
 
 TEST_F (DynLhashTableTest, Remove)
 
 TEST_F (DynLhashTableTest, UpdateExisting)
 
 TEST_F (DynLhashTableTest, BracketOperatorInsert)
 
 TEST_F (DynLhashTableTest, BracketOperatorUpdate)
 
 TEST_F (DynLhashTableTest, BracketOperatorReadExisting)
 
 TEST_F (DynLhashTableTest, BracketOperatorReadNonExisting)
 
 TEST_F (DynLhashTableTest, CopyConstructor)
 
 TEST_F (DynLhashTableTest, CopyAssignment)
 
 TEST_F (DynLhashTableTest, MoveConstructor)
 
 TEST_F (DynLhashTableTest, MoveAssignment)
 
 TEST_F (DynLhashTableTest, SelfAssignment)
 
 TEST (DynLhashTableStringKey, BasicOperations)
 
 TEST (DynLhashTableStringKey, LongStrings)
 
 TEST (DynLhashTableCollision, SameHashBucket)
 
 TEST (DynLhashTableMoveValue, MoveInsert)
 
 TEST (DynLhashTableMoveValue, MoveKeyAndValue)
 
 TEST (DynLhashTableStress, ManyInsertions)
 
 TEST (DynLhashTableStress, ManyInsertionsAndRemovals)
 
 TEST (DynLhashTableStress, RandomOperations)
 
 TEST_F (DynLhashTableTest, EmptyTable)
 
 TEST_F (DynLhashTableTest, NegativeKeys)
 
 TEST_F (DynLhashTableTest, SameKeyMultipleInserts)
 
size_t custom_hash (const int &key)
 
 TEST (DynLhashTableCustomHash, WithCustomHashFunction)
 
 TEST (DynLhashTableSwap, SwapTables)
 
 TEST (DynLhashTableSwap, SwapWithEmpty)
 
 TEST (DynLhashTablePostMove, MoveConstructorTransfersOwnership)
 
 TEST (DynLhashTablePostMove, MoveAssignmentTransfersOwnership)
 
 TEST (DynLhashTableComplexType, MoveSemanticsPropagated)
 
 TEST (DynLhashTableDuplicates, InsertDuplicateKeysAllowed)
 
 TEST (DynLhashTableDuplicates, RemoveOneDuplicate)
 
 TEST (DynLhashTableStress, LargeScaleWithVerification)
 
 TEST (DynLhashTableStress, InterleavedInsertRemove)
 
int main (int argc, char **argv)
 

Detailed Description

Comprehensive tests for DynLhashTable (dynamic hash table with chaining)

Definition in file tpl_dynLhash_test.cc.

Function Documentation

◆ custom_hash()

size_t custom_hash ( const int &  key)

Definition at line 422 of file tpl_dynLhash_test.cc.

Referenced by TEST(), TEST(), and TEST().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 689 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST() [1/18]

TEST ( DynLhashTableCollision  ,
SameHashBucket   
)

◆ TEST() [2/18]

TEST ( DynLhashTableComplexType  ,
MoveSemanticsPropagated   
)

◆ TEST() [3/18]

TEST ( DynLhashTableCustomHash  ,
WithCustomHashFunction   
)

◆ TEST() [4/18]

TEST ( DynLhashTableDuplicates  ,
InsertDuplicateKeysAllowed   
)

◆ TEST() [5/18]

◆ TEST() [6/18]

TEST ( DynLhashTableMoveValue  ,
MoveInsert   
)

◆ TEST() [7/18]

TEST ( DynLhashTableMoveValue  ,
MoveKeyAndValue   
)

◆ TEST() [8/18]

TEST ( DynLhashTablePostMove  ,
MoveAssignmentTransfersOwnership   
)

◆ TEST() [9/18]

TEST ( DynLhashTablePostMove  ,
MoveConstructorTransfersOwnership   
)

◆ TEST() [10/18]

◆ TEST() [11/18]

TEST ( DynLhashTableStress  ,
LargeScaleWithVerification   
)

◆ TEST() [12/18]

TEST ( DynLhashTableStress  ,
ManyInsertions   
)

◆ TEST() [13/18]

◆ TEST() [14/18]

◆ TEST() [15/18]

TEST ( DynLhashTableStringKey  ,
BasicOperations   
)

◆ TEST() [16/18]

TEST ( DynLhashTableStringKey  ,
LongStrings   
)

◆ TEST() [17/18]

TEST ( DynLhashTableSwap  ,
SwapTables   
)

◆ TEST() [18/18]

TEST ( DynLhashTableSwap  ,
SwapWithEmpty   
)

◆ TEST_F() [1/17]

TEST_F ( DynLhashTableTest  ,
BracketOperatorInsert   
)

Definition at line 113 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [2/17]

TEST_F ( DynLhashTableTest  ,
BracketOperatorReadExisting   
)

Definition at line 130 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [3/17]

TEST_F ( DynLhashTableTest  ,
BracketOperatorReadNonExisting   
)

Definition at line 138 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [4/17]

TEST_F ( DynLhashTableTest  ,
BracketOperatorUpdate   
)

Definition at line 122 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [5/17]

TEST_F ( DynLhashTableTest  ,
CopyAssignment   
)

Definition at line 167 of file tpl_dynLhash_test.cc.

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

◆ TEST_F() [6/17]

TEST_F ( DynLhashTableTest  ,
CopyConstructor   
)

Definition at line 152 of file tpl_dynLhash_test.cc.

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

◆ TEST_F() [7/17]

TEST_F ( DynLhashTableTest  ,
EmptyTable   
)

Definition at line 384 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [8/17]

TEST_F ( DynLhashTableTest  ,
InsertAndSearch   
)

◆ TEST_F() [9/17]

TEST_F ( DynLhashTableTest  ,
InsertMultiple   
)

Definition at line 76 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [10/17]

TEST_F ( DynLhashTableTest  ,
MoveAssignment   
)

Definition at line 193 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [11/17]

TEST_F ( DynLhashTableTest  ,
MoveConstructor   
)

Definition at line 182 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [12/17]

TEST_F ( DynLhashTableTest  ,
NegativeKeys   
)

Definition at line 391 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [13/17]

TEST_F ( DynLhashTableTest  ,
Remove   
)

Definition at line 87 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [14/17]

TEST_F ( DynLhashTableTest  ,
SameKeyMultipleInserts   
)

Definition at line 402 of file tpl_dynLhash_test.cc.

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

◆ TEST_F() [15/17]

TEST_F ( DynLhashTableTest  ,
SearchNonExistent   
)

Definition at line 68 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [16/17]

TEST_F ( DynLhashTableTest  ,
SelfAssignment   
)

Definition at line 205 of file tpl_dynLhash_test.cc.

References Aleph::maps().

◆ TEST_F() [17/17]

TEST_F ( DynLhashTableTest  ,
UpdateExisting   
)

Definition at line 98 of file tpl_dynLhash_test.cc.

References Aleph::maps().