Inheritance diagram for TestClpMap:
Collaboration diagram for TestClpMap:

Protected Types

using Map = ClpMap< std::string, int >
 

Protected Member Functions

void testMemoryCounter ()
 
void testConstructor ()
 
void testEntryCounter ()
 
void testPutGetDelete ()
 
void testMisses ()
 
void testMemoryLimit ()
 
void testTtlExpiration ()
 
void testReplaceEntryWithShorterTtl ()
 
void testZeroTtl ()
 
void testNegativeTtl ()
 
void testPurgeIsLru ()
 
void testClassicLoopTraversal ()
 
void testRangeLoopTraversal ()
 
void addSequenceOfEntriesToMap (Map &, size_t count, Map::mapped_type startWith, Map::Ttl)
 
void fillMapWithEntries (Map &)
 add (more than) enough entries to make the map full More...
 
void addOneEntry (Map &, Map::mapped_type)
 
void addOneEntry (Map &, Map::mapped_type, Map::Ttl)
 

Private Member Functions

 CPPUNIT_TEST_SUITE (TestClpMap)
 
 CPPUNIT_TEST (testMemoryCounter)
 
 CPPUNIT_TEST (testConstructor)
 
 CPPUNIT_TEST (testEntryCounter)
 
 CPPUNIT_TEST (testPutGetDelete)
 
 CPPUNIT_TEST (testMisses)
 
 CPPUNIT_TEST (testMemoryLimit)
 
 CPPUNIT_TEST (testTtlExpiration)
 
 CPPUNIT_TEST (testReplaceEntryWithShorterTtl)
 
 CPPUNIT_TEST (testZeroTtl)
 
 CPPUNIT_TEST (testNegativeTtl)
 
 CPPUNIT_TEST (testPurgeIsLru)
 
 CPPUNIT_TEST (testClassicLoopTraversal)
 
 CPPUNIT_TEST (testRangeLoopTraversal)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 17 of file testClpMap.cc.

Member Typedef Documentation

◆ Map

using TestClpMap::Map = ClpMap<std::string, int>
protected

Definition at line 36 of file testClpMap.cc.

Member Function Documentation

◆ addOneEntry() [1/2]

void TestClpMap::addOneEntry ( Map m,
Map::mapped_type  value 
)
protected

generate and add an entry with a given value (and a matching key) to the map using map-default TTL

Definition at line 87 of file testClpMap.cc.

References ClpMap< Key, Value, MemoryUsedBy >::add(), and ClpMap< Key, Value, MemoryUsedBy >::get().

Referenced by testNegativeTtl(), testPurgeIsLru(), testReplaceEntryWithShorterTtl(), testTtlExpiration(), and testZeroTtl().

◆ addOneEntry() [2/2]

void TestClpMap::addOneEntry ( Map m,
Map::mapped_type  value,
Map::Ttl  ttl 
)
protected

generate and add an entry with a given value, a matching key, and a given TTL to the map

Definition at line 96 of file testClpMap.cc.

References ClpMap< Key, Value, MemoryUsedBy >::add(), and ClpMap< Key, Value, MemoryUsedBy >::get().

◆ addSequenceOfEntriesToMap()

void TestClpMap::addSequenceOfEntriesToMap ( Map m,
size_t  count,
Map::mapped_type  startWith,
Map::Ttl  ttl 
)
protected

Generate and insert the given number of entries into the given map. Each entry is guaranteed to be inserted, but that insertion may purge other entries, including entries previously added during the same method call.

Definition at line 74 of file testClpMap.cc.

References ClpMap< Key, Value, MemoryUsedBy >::add().

Referenced by fillMapWithEntries(), testClassicLoopTraversal(), testEntryCounter(), testPutGetDelete(), and testRangeLoopTraversal().

◆ CPPUNIT_TEST() [1/13]

TestClpMap::CPPUNIT_TEST ( testClassicLoopTraversal  )
private

◆ CPPUNIT_TEST() [2/13]

TestClpMap::CPPUNIT_TEST ( testConstructor  )
private

◆ CPPUNIT_TEST() [3/13]

TestClpMap::CPPUNIT_TEST ( testEntryCounter  )
private

◆ CPPUNIT_TEST() [4/13]

TestClpMap::CPPUNIT_TEST ( testMemoryCounter  )
private

◆ CPPUNIT_TEST() [5/13]

TestClpMap::CPPUNIT_TEST ( testMemoryLimit  )
private

◆ CPPUNIT_TEST() [6/13]

TestClpMap::CPPUNIT_TEST ( testMisses  )
private

◆ CPPUNIT_TEST() [7/13]

TestClpMap::CPPUNIT_TEST ( testNegativeTtl  )
private

◆ CPPUNIT_TEST() [8/13]

TestClpMap::CPPUNIT_TEST ( testPurgeIsLru  )
private

◆ CPPUNIT_TEST() [9/13]

TestClpMap::CPPUNIT_TEST ( testPutGetDelete  )
private

◆ CPPUNIT_TEST() [10/13]

TestClpMap::CPPUNIT_TEST ( testRangeLoopTraversal  )
private

◆ CPPUNIT_TEST() [11/13]

TestClpMap::CPPUNIT_TEST ( testReplaceEntryWithShorterTtl  )
private

◆ CPPUNIT_TEST() [12/13]

TestClpMap::CPPUNIT_TEST ( testTtlExpiration  )
private

◆ CPPUNIT_TEST() [13/13]

TestClpMap::CPPUNIT_TEST ( testZeroTtl  )
private

◆ CPPUNIT_TEST_SUITE()

TestClpMap::CPPUNIT_TEST_SUITE ( TestClpMap  )
private

◆ CPPUNIT_TEST_SUITE_END()

TestClpMap::CPPUNIT_TEST_SUITE_END ( )
private

◆ fillMapWithEntries()

void TestClpMap::fillMapWithEntries ( Map m)
protected

◆ testClassicLoopTraversal()

void TestClpMap::testClassicLoopTraversal ( )
protected

◆ testConstructor()

◆ testEntryCounter()

void TestClpMap::testEntryCounter ( )
protected

◆ testMemoryCounter()

void TestClpMap::testMemoryCounter ( )
protected

Definition at line 150 of file testClpMap.cc.

References DefaultMemoryUsage().

◆ testMemoryLimit()

◆ testMisses()

◆ testNegativeTtl()

void TestClpMap::testNegativeTtl ( )
protected

◆ testPurgeIsLru()

void TestClpMap::testPurgeIsLru ( )
protected

◆ testPutGetDelete()

◆ testRangeLoopTraversal()

void TestClpMap::testRangeLoopTraversal ( )
protected

Definition at line 367 of file testClpMap.cc.

References addSequenceOfEntriesToMap().

◆ testReplaceEntryWithShorterTtl()

void TestClpMap::testReplaceEntryWithShorterTtl ( )
protected

◆ testTtlExpiration()

void TestClpMap::testTtlExpiration ( )
protected

◆ testZeroTtl()

void TestClpMap::testZeroTtl ( )
protected

The documentation for this class was generated from the following file:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors