From c9c5bfc57475788081ef86fd5ce83b24a93890ea Mon Sep 17 00:00:00 2001 From: khizmax Date: Fri, 27 Mar 2015 15:40:02 +0300 Subject: [PATCH] Splitted up set_insdelfind test --- projects/Win/vc12/unit-set-insdel.vcxproj | 9 + .../Win/vc12/unit-set-insdel.vcxproj.filters | 27 ++ projects/source.unit.set.mk | 8 + tests/unit/set2/set_insdel_string.h | 1 - tests/unit/set2/set_insdelfind.cpp | 309 +++--------------- tests/unit/set2/set_insdelfind.h | 253 ++++++++++++++ tests/unit/set2/set_insdelfind_cuckoo.cpp | 9 + tests/unit/set2/set_insdelfind_ellentree.cpp | 9 + tests/unit/set2/set_insdelfind_michael.cpp | 9 + tests/unit/set2/set_insdelfind_refinable.cpp | 9 + tests/unit/set2/set_insdelfind_skip.cpp | 9 + tests/unit/set2/set_insdelfind_split.cpp | 9 + tests/unit/set2/set_insdelfind_std.cpp | 9 + tests/unit/set2/set_insdelfind_striped.cpp | 9 + 14 files changed, 419 insertions(+), 260 deletions(-) create mode 100644 tests/unit/set2/set_insdelfind.h create mode 100644 tests/unit/set2/set_insdelfind_cuckoo.cpp create mode 100644 tests/unit/set2/set_insdelfind_ellentree.cpp create mode 100644 tests/unit/set2/set_insdelfind_michael.cpp create mode 100644 tests/unit/set2/set_insdelfind_refinable.cpp create mode 100644 tests/unit/set2/set_insdelfind_skip.cpp create mode 100644 tests/unit/set2/set_insdelfind_split.cpp create mode 100644 tests/unit/set2/set_insdelfind_std.cpp create mode 100644 tests/unit/set2/set_insdelfind_striped.cpp diff --git a/projects/Win/vc12/unit-set-insdel.vcxproj b/projects/Win/vc12/unit-set-insdel.vcxproj index cb028abd..4efad4dd 100644 --- a/projects/Win/vc12/unit-set-insdel.vcxproj +++ b/projects/Win/vc12/unit-set-insdel.vcxproj @@ -44,6 +44,14 @@ + + + + + + + + @@ -62,6 +70,7 @@ + diff --git a/projects/Win/vc12/unit-set-insdel.vcxproj.filters b/projects/Win/vc12/unit-set-insdel.vcxproj.filters index 604ad7f5..ff6fd745 100644 --- a/projects/Win/vc12/unit-set-insdel.vcxproj.filters +++ b/projects/Win/vc12/unit-set-insdel.vcxproj.filters @@ -52,6 +52,30 @@ set_insdel_string + + set_insdelfind + + + set_insdelfind + + + set_insdelfind + + + set_insdelfind + + + set_insdelfind + + + set_insdelfind + + + set_insdelfind + + + set_insdelfind + @@ -71,5 +95,8 @@ set_insdel_string + + set_insdelfind + \ No newline at end of file diff --git a/projects/source.unit.set.mk b/projects/source.unit.set.mk index 66cf3196..2f286246 100644 --- a/projects/source.unit.set.mk +++ b/projects/source.unit.set.mk @@ -17,6 +17,14 @@ CDSUNIT_SET_SOURCES := \ tests/unit/set2/set_insdel_string_striped.cpp \ tests/unit/set2/set_insdel_string_std.cpp \ tests/unit/set2/set_insdelfind.cpp \ + tests/unit/set2/set_insdelfind_michael.cpp \ + tests/unit/set2/set_insdelfind_cuckoo.cpp \ + tests/unit/set2/set_insdelfind_ellentree.cpp \ + tests/unit/set2/set_insdelfind_refinable.cpp \ + tests/unit/set2/set_insdelfind_skip.cpp \ + tests/unit/set2/set_insdelfind_split.cpp \ + tests/unit/set2/set_insdelfind_striped.cpp \ + tests/unit/set2/set_insdelfind_std.cpp \ tests/unit/set2/set_delodd.cpp \ tests/unit/set2/set_delodd_cuckoo.cpp \ tests/unit/set2/set_delodd_michael.cpp \ diff --git a/tests/unit/set2/set_insdel_string.h b/tests/unit/set2/set_insdel_string.h index 68300991..359368fa 100644 --- a/tests/unit/set2/set_insdel_string.h +++ b/tests/unit/set2/set_insdel_string.h @@ -538,7 +538,6 @@ namespace set2 { virtual void myRun(const char *in_name, bool invert = false); - # include "set2/set_defs.h" CDSUNIT_DECLARE_MichaelSet CDSUNIT_DECLARE_SplitList diff --git a/tests/unit/set2/set_insdelfind.cpp b/tests/unit/set2/set_insdelfind.cpp index 0d4d5f45..82c61d74 100644 --- a/tests/unit/set2/set_insdelfind.cpp +++ b/tests/unit/set2/set_insdelfind.cpp @@ -1,269 +1,62 @@ //$$CDS-header$$ -#include "set2/set_types.h" -#include "cppunit/thread.h" -#include // random_shuffle +#include "set2/set_insdelfind.h" namespace set2 { + CPPUNIT_TEST_SUITE_REGISTRATION( Set_InsDelFind ); -# define TEST_SET(X) void X() { test::X >() ; } -# define TEST_SET_EXTRACT(X) TEST_SET(X) -# define TEST_SET_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_SET_NOLF_EXTRACT(X) TEST_SET_NOLF(X) + size_t Set_InsDelFind::c_nInitialMapSize = 500000; + size_t Set_InsDelFind::c_nThreadCount = 8; + size_t Set_InsDelFind::c_nMaxLoadFactor = 8; + unsigned int Set_InsDelFind::c_nInsertPercentage = 5; + unsigned int Set_InsDelFind::c_nDeletePercentage = 5; + unsigned int Set_InsDelFind::c_nDuration = 30; + bool Set_InsDelFind::c_bPrintGCState = true; - namespace { - static size_t c_nInitialMapSize = 500000 ; // initial map size - static size_t c_nThreadCount = 8 ; // thread count - static size_t c_nMaxLoadFactor = 8 ; // maximum load factor - static unsigned int c_nInsertPercentage = 5; - static unsigned int c_nDeletePercentage = 5; - static unsigned int c_nDuration = 30 ; // test duration, seconds - static bool c_bPrintGCState = true; + void Set_InsDelFind::setUpParams( const CppUnitMini::TestCfg& cfg ) + { + c_nInitialMapSize = cfg.getSizeT("InitialMapSize", c_nInitialMapSize ); + c_nThreadCount = cfg.getSizeT("ThreadCount", c_nThreadCount ); + c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor ); + c_nInsertPercentage = cfg.getUInt("InsertPercentage", c_nInsertPercentage ); + c_nDeletePercentage = cfg.getUInt("DeletePercentage", c_nDeletePercentage ); + c_nDuration = cfg.getUInt("Duration", c_nDuration ); + c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState ); + + if ( c_nThreadCount == 0 ) + c_nThreadCount = cds::OS::topology::processor_count() * 2; + + CPPUNIT_ASSERT( c_nInsertPercentage + c_nDeletePercentage <= 100 ); + + actions * pFirst = m_arrShuffle; + actions * pLast = m_arrShuffle + c_nInsertPercentage; + std::fill( pFirst, pLast, do_insert ); + pFirst = pLast; + pLast += c_nDeletePercentage; + std::fill( pFirst, pLast, do_delete ); + pFirst = pLast; + pLast = m_arrShuffle + sizeof(m_arrShuffle)/sizeof(m_arrShuffle[0]); + std::fill( pFirst, pLast, do_find ); + std::random_shuffle( m_arrShuffle, pLast ); } - class Set_InsDelFind: public CppUnitMini::TestCase + void Set_InsDelFind::myRun(const char *in_name, bool invert /*= false*/) { - public: - enum actions - { - do_find, - do_insert, - do_delete - }; - static const unsigned int c_nShuffleSize = 100; - actions m_arrShuffle[c_nShuffleSize]; - - protected: - typedef size_t key_type; - typedef size_t value_type; - - template - class WorkThread: public CppUnitMini::TestThread - { - Set& m_Map; - - virtual WorkThread * clone() - { - return new WorkThread( *this ); - } - public: - size_t m_nInsertSuccess; - size_t m_nInsertFailed; - size_t m_nDeleteSuccess; - size_t m_nDeleteFailed; - size_t m_nFindSuccess; - size_t m_nFindFailed; - - public: - WorkThread( CppUnitMini::ThreadPool& pool, Set& rMap ) - : CppUnitMini::TestThread( pool ) - , m_Map( rMap ) - {} - WorkThread( WorkThread& src ) - : CppUnitMini::TestThread( src ) - , m_Map( src.m_Map ) - {} - - Set_InsDelFind& getTest() - { - return reinterpret_cast( m_Pool.m_Test ); - } - - virtual void init() { cds::threading::Manager::attachThread() ; } - virtual void fini() { cds::threading::Manager::detachThread() ; } - - virtual void test() - { - Set& rMap = m_Map; - - m_nInsertSuccess = - m_nInsertFailed = - m_nDeleteSuccess = - m_nDeleteFailed = - m_nFindSuccess = - m_nFindFailed = 0; - - actions * pAct = getTest().m_arrShuffle; - unsigned int i = 0; - size_t const nNormalize = size_t(-1) / (c_nInitialMapSize * 2); - - size_t nRand = 0; - while ( !time_elapsed() ) { - nRand = cds::bitop::RandXorShift(nRand); - size_t n = nRand / nNormalize; - switch ( pAct[i] ) { - case do_find: - if ( rMap.find( n )) - ++m_nFindSuccess; - else - ++m_nFindFailed; - break; - case do_insert: - if ( rMap.insert( n )) - ++m_nInsertSuccess; - else - ++m_nInsertFailed; - break; - case do_delete: - if ( rMap.erase( n )) - ++m_nDeleteSuccess; - else - ++m_nDeleteFailed; - break; - } - - if ( ++i >= c_nShuffleSize ) - i = 0; - } - } - }; - - protected: - template - void do_test( size_t nLoadFactor ) - { - CPPUNIT_MSG( "Load factor=" << nLoadFactor ); - - Set testSet( c_nInitialMapSize, nLoadFactor ); - do_test_with( testSet ); - } - - template - void do_test_with( Set& testSet ) - { - typedef WorkThread work_thread; - - // fill map - only odd number - { - size_t * pInitArr = new size_t[ c_nInitialMapSize ]; - size_t * pEnd = pInitArr + c_nInitialMapSize; - for ( size_t i = 0; i < c_nInitialMapSize; ++i ) - pInitArr[i] = i * 2 + 1; - std::random_shuffle( pInitArr, pEnd ); - for ( size_t * p = pInitArr; p < pEnd; ++p ) - testSet.insert( typename Set::value_type( *p, *p ) ); - delete [] pInitArr; - } - - cds::OS::Timer timer; - - CppUnitMini::ThreadPool pool( *this ); - pool.add( new work_thread( pool, testSet ), c_nThreadCount ); - pool.run( c_nDuration ); - CPPUNIT_MSG( " Duration=" << pool.avgDuration() ); - - size_t nInsertSuccess = 0; - size_t nInsertFailed = 0; - size_t nDeleteSuccess = 0; - size_t nDeleteFailed = 0; - size_t nFindSuccess = 0; - size_t nFindFailed = 0; - for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) { - work_thread * pThread = static_cast( *it ); - assert( pThread != nullptr ); - nInsertSuccess += pThread->m_nInsertSuccess; - nInsertFailed += pThread->m_nInsertFailed; - nDeleteSuccess += pThread->m_nDeleteSuccess; - nDeleteFailed += pThread->m_nDeleteFailed; - nFindSuccess += pThread->m_nFindSuccess; - nFindFailed += pThread->m_nFindFailed; - } - - size_t nTotalOps = nInsertSuccess + nInsertFailed + nDeleteSuccess + nDeleteFailed + nFindSuccess + nFindFailed; - - CPPUNIT_MSG( " Totals (success/failed): \n\t" - << " Insert=" << nInsertSuccess << '/' << nInsertFailed << "\n\t" - << " Delete=" << nDeleteSuccess << '/' << nDeleteFailed << "\n\t" - << " Find=" << nFindSuccess << '/' << nFindFailed << "\n\t" - << " Speed=" << (nFindSuccess + nFindFailed) / c_nDuration << " find/sec\n\t" - << " " << (nInsertSuccess + nDeleteSuccess) / c_nDuration << " modify/sec\n\t" - << " Total ops=" << nTotalOps << "\n\t" - << " speed=" << nTotalOps / c_nDuration << " ops/sec\n\t" - << " Set size=" << testSet.size() - ); - - - CPPUNIT_MSG( " Clear map (single-threaded)..." ); - timer.reset(); - testSet.clear(); - CPPUNIT_MSG( " Duration=" << timer.duration() ); - CPPUNIT_CHECK_EX( testSet.empty(), ((long long) testSet.size()) ); - - additional_check( testSet ); - print_stat( testSet ); - additional_cleanup( testSet ); - } - - template - void test() - { - CPPUNIT_MSG( "Thread count=" << c_nThreadCount - << " initial map size=" << c_nInitialMapSize - << " insert=" << c_nInsertPercentage << '%' - << " delete=" << c_nDeletePercentage << '%' - << " duration=" << c_nDuration << "s" - ); - - for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) { - do_test( nLoadFactor ); - if ( c_bPrintGCState ) - print_gc_state(); - } - } - - template - void test_nolf() - { - CPPUNIT_MSG( "Thread count=" << c_nThreadCount - << " initial map size=" << c_nInitialMapSize - << " insert=" << c_nInsertPercentage << '%' - << " delete=" << c_nDeletePercentage << '%' - << " duration=" << c_nDuration << "s" - ); - - Set s; - do_test_with( s ); - //CPPUNIT_MSG( s.statistics() ); - if ( c_bPrintGCState ) - print_gc_state(); - } - - void setUpParams( const CppUnitMini::TestCfg& cfg ) { - c_nInitialMapSize = cfg.getULong("InitialMapSize", 500000 ); - c_nThreadCount = cfg.getULong("ThreadCount", 8 ); - c_nMaxLoadFactor = cfg.getULong("MaxLoadFactor", 8 ); - c_nInsertPercentage = cfg.getUInt("InsertPercentage", 5 ); - c_nDeletePercentage = cfg.getUInt("DeletePercentage", 5 ); - c_nDuration = cfg.getUInt("Duration", 30 ); - c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true ); - - if ( c_nThreadCount == 0 ) - c_nThreadCount = cds::OS::topology::processor_count() * 2; - - CPPUNIT_ASSERT( c_nInsertPercentage + c_nDeletePercentage <= 100 ); - - actions * pFirst = m_arrShuffle; - actions * pLast = m_arrShuffle + c_nInsertPercentage; - std::fill( pFirst, pLast, do_insert ); - pFirst = pLast; - pLast += c_nDeletePercentage; - std::fill( pFirst, pLast, do_delete ); - pFirst = pLast; - pLast = m_arrShuffle + sizeof(m_arrShuffle)/sizeof(m_arrShuffle[0]); - std::fill( pFirst, pLast, do_find ); - std::random_shuffle( m_arrShuffle, pLast ); - } - -# include "set2/set_defs.h" - CDSUNIT_DECLARE_MichaelSet - CDSUNIT_DECLARE_SplitList - CDSUNIT_DECLARE_StripedSet - CDSUNIT_DECLARE_RefinableSet - CDSUNIT_DECLARE_CuckooSet - CDSUNIT_DECLARE_SkipListSet - CDSUNIT_DECLARE_EllenBinTreeSet - CDSUNIT_DECLARE_StdSet + setUpParams( m_Cfg.get( "Map_InsDelFind" )); + + run_MichaelSet(in_name, invert); + run_SplitList(in_name, invert); + run_SkipListSet(in_name, invert); + run_EllenBinTreeSet(in_name, invert); + run_StripedSet(in_name, invert); + run_RefinableSet(in_name, invert); + run_CuckooSet(in_name, invert); + run_StdSet(in_name, invert); + + endTestCase(); + } + /* CPPUNIT_TEST_SUITE_( Set_InsDelFind, "Map_InsDelFind" ) CDSUNIT_TEST_MichaelSet CDSUNIT_TEST_SplitList @@ -274,7 +67,5 @@ namespace set2 { CDSUNIT_TEST_CuckooSet CDSUNIT_TEST_StdSet CPPUNIT_TEST_SUITE_END() - }; - - CPPUNIT_TEST_SUITE_REGISTRATION( Set_InsDelFind ); + */ } // namespace set2 diff --git a/tests/unit/set2/set_insdelfind.h b/tests/unit/set2/set_insdelfind.h new file mode 100644 index 00000000..2a128cbd --- /dev/null +++ b/tests/unit/set2/set_insdelfind.h @@ -0,0 +1,253 @@ +//$$CDS-header$$ + +#include "set2/set_types.h" +#include "cppunit/thread.h" +#include // random_shuffle + +namespace set2 { + +# define TEST_SET(X) void X() { test::X >() ; } +# define TEST_SET_EXTRACT(X) TEST_SET(X) +# define TEST_SET_NOLF(X) void X() { test_nolf::X >() ; } +# define TEST_SET_NOLF_EXTRACT(X) TEST_SET_NOLF(X) + + class Set_InsDelFind: public CppUnitMini::TestCase + { + static size_t c_nInitialMapSize; // initial map size + static size_t c_nThreadCount; // thread count + static size_t c_nMaxLoadFactor; // maximum load factor + static unsigned int c_nInsertPercentage; + static unsigned int c_nDeletePercentage; + static unsigned int c_nDuration; // test duration, seconds + static bool c_bPrintGCState; + + public: + enum actions + { + do_find, + do_insert, + do_delete + }; + static const unsigned int c_nShuffleSize = 100; + actions m_arrShuffle[c_nShuffleSize]; + + protected: + typedef CppUnitMini::TestCase Base; + typedef size_t key_type; + typedef size_t value_type; + + template + class WorkThread: public CppUnitMini::TestThread + { + Set& m_Map; + + virtual WorkThread * clone() + { + return new WorkThread( *this ); + } + public: + size_t m_nInsertSuccess; + size_t m_nInsertFailed; + size_t m_nDeleteSuccess; + size_t m_nDeleteFailed; + size_t m_nFindSuccess; + size_t m_nFindFailed; + + public: + WorkThread( CppUnitMini::ThreadPool& pool, Set& rMap ) + : CppUnitMini::TestThread( pool ) + , m_Map( rMap ) + {} + WorkThread( WorkThread& src ) + : CppUnitMini::TestThread( src ) + , m_Map( src.m_Map ) + {} + + Set_InsDelFind& getTest() + { + return reinterpret_cast( m_Pool.m_Test ); + } + + virtual void init() { cds::threading::Manager::attachThread() ; } + virtual void fini() { cds::threading::Manager::detachThread() ; } + + virtual void test() + { + Set& rMap = m_Map; + + m_nInsertSuccess = + m_nInsertFailed = + m_nDeleteSuccess = + m_nDeleteFailed = + m_nFindSuccess = + m_nFindFailed = 0; + + actions * pAct = getTest().m_arrShuffle; + unsigned int i = 0; + size_t const nNormalize = size_t(-1) / (c_nInitialMapSize * 2); + + size_t nRand = 0; + while ( !time_elapsed() ) { + nRand = cds::bitop::RandXorShift(nRand); + size_t n = nRand / nNormalize; + switch ( pAct[i] ) { + case do_find: + if ( rMap.find( n )) + ++m_nFindSuccess; + else + ++m_nFindFailed; + break; + case do_insert: + if ( rMap.insert( n )) + ++m_nInsertSuccess; + else + ++m_nInsertFailed; + break; + case do_delete: + if ( rMap.erase( n )) + ++m_nDeleteSuccess; + else + ++m_nDeleteFailed; + break; + } + + if ( ++i >= c_nShuffleSize ) + i = 0; + } + } + }; + + protected: + template + void do_test( size_t nLoadFactor ) + { + CPPUNIT_MSG( "Load factor=" << nLoadFactor ); + + Set testSet( c_nInitialMapSize, nLoadFactor ); + do_test_with( testSet ); + } + + template + void do_test_with( Set& testSet ) + { + typedef WorkThread work_thread; + + // fill map - only odd number + { + size_t * pInitArr = new size_t[ c_nInitialMapSize ]; + size_t * pEnd = pInitArr + c_nInitialMapSize; + for ( size_t i = 0; i < c_nInitialMapSize; ++i ) + pInitArr[i] = i * 2 + 1; + std::random_shuffle( pInitArr, pEnd ); + for ( size_t * p = pInitArr; p < pEnd; ++p ) + testSet.insert( typename Set::value_type( *p, *p ) ); + delete [] pInitArr; + } + + cds::OS::Timer timer; + + CppUnitMini::ThreadPool pool( *this ); + pool.add( new work_thread( pool, testSet ), c_nThreadCount ); + pool.run( c_nDuration ); + CPPUNIT_MSG( " Duration=" << pool.avgDuration() ); + + size_t nInsertSuccess = 0; + size_t nInsertFailed = 0; + size_t nDeleteSuccess = 0; + size_t nDeleteFailed = 0; + size_t nFindSuccess = 0; + size_t nFindFailed = 0; + for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) { + work_thread * pThread = static_cast( *it ); + assert( pThread != nullptr ); + nInsertSuccess += pThread->m_nInsertSuccess; + nInsertFailed += pThread->m_nInsertFailed; + nDeleteSuccess += pThread->m_nDeleteSuccess; + nDeleteFailed += pThread->m_nDeleteFailed; + nFindSuccess += pThread->m_nFindSuccess; + nFindFailed += pThread->m_nFindFailed; + } + + size_t nTotalOps = nInsertSuccess + nInsertFailed + nDeleteSuccess + nDeleteFailed + nFindSuccess + nFindFailed; + + CPPUNIT_MSG( " Totals (success/failed): \n\t" + << " Insert=" << nInsertSuccess << '/' << nInsertFailed << "\n\t" + << " Delete=" << nDeleteSuccess << '/' << nDeleteFailed << "\n\t" + << " Find=" << nFindSuccess << '/' << nFindFailed << "\n\t" + << " Speed=" << (nFindSuccess + nFindFailed) / c_nDuration << " find/sec\n\t" + << " " << (nInsertSuccess + nDeleteSuccess) / c_nDuration << " modify/sec\n\t" + << " Total ops=" << nTotalOps << "\n\t" + << " speed=" << nTotalOps / c_nDuration << " ops/sec\n\t" + << " Set size=" << testSet.size() + ); + + + CPPUNIT_MSG( " Clear map (single-threaded)..." ); + timer.reset(); + testSet.clear(); + CPPUNIT_MSG( " Duration=" << timer.duration() ); + CPPUNIT_CHECK_EX( testSet.empty(), ((long long) testSet.size()) ); + + additional_check( testSet ); + print_stat( testSet ); + additional_cleanup( testSet ); + } + + template + void test() + { + CPPUNIT_MSG( "Thread count=" << c_nThreadCount + << " initial map size=" << c_nInitialMapSize + << " insert=" << c_nInsertPercentage << '%' + << " delete=" << c_nDeletePercentage << '%' + << " duration=" << c_nDuration << "s" + ); + + for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) { + do_test( nLoadFactor ); + if ( c_bPrintGCState ) + print_gc_state(); + } + } + + template + void test_nolf() + { + CPPUNIT_MSG( "Thread count=" << c_nThreadCount + << " initial map size=" << c_nInitialMapSize + << " insert=" << c_nInsertPercentage << '%' + << " delete=" << c_nDeletePercentage << '%' + << " duration=" << c_nDuration << "s" + ); + + Set s; + do_test_with( s ); + //CPPUNIT_MSG( s.statistics() ); + if ( c_bPrintGCState ) + print_gc_state(); + } + + void setUpParams( const CppUnitMini::TestCfg& cfg ); + + void run_MichaelSet(const char *in_name, bool invert = false); + void run_SplitList(const char *in_name, bool invert = false); + void run_SkipListSet(const char *in_name, bool invert = false); + void run_CuckooSet(const char *in_name, bool invert = false); + void run_StripedSet(const char *in_name, bool invert = false); + void run_RefinableSet(const char *in_name, bool invert = false); + void run_EllenBinTreeSet(const char *in_name, bool invert = false); + void run_StdSet(const char *in_name, bool invert = false); + + virtual void myRun(const char *in_name, bool invert = false); + +# include "set2/set_defs.h" + CDSUNIT_DECLARE_MichaelSet + CDSUNIT_DECLARE_SplitList + CDSUNIT_DECLARE_StripedSet + CDSUNIT_DECLARE_RefinableSet + CDSUNIT_DECLARE_CuckooSet + CDSUNIT_DECLARE_SkipListSet + CDSUNIT_DECLARE_EllenBinTreeSet + CDSUNIT_DECLARE_StdSet + }; +} // namespace set2 diff --git a/tests/unit/set2/set_insdelfind_cuckoo.cpp b/tests/unit/set2/set_insdelfind_cuckoo.cpp new file mode 100644 index 00000000..f5986abd --- /dev/null +++ b/tests/unit/set2/set_insdelfind_cuckoo.cpp @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#include "set2/set_insdelfind.h" + +namespace set2 { + CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_CuckooSet ) + CDSUNIT_TEST_CuckooSet + CPPUNIT_TEST_SUITE_END_PART() +} // namespace set2 diff --git a/tests/unit/set2/set_insdelfind_ellentree.cpp b/tests/unit/set2/set_insdelfind_ellentree.cpp new file mode 100644 index 00000000..db2a7e37 --- /dev/null +++ b/tests/unit/set2/set_insdelfind_ellentree.cpp @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#include "set2/set_insdelfind.h" + +namespace set2 { + CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_EllenBinTreeSet ) + CDSUNIT_TEST_EllenBinTreeSet + CPPUNIT_TEST_SUITE_END_PART() +} // namespace set2 diff --git a/tests/unit/set2/set_insdelfind_michael.cpp b/tests/unit/set2/set_insdelfind_michael.cpp new file mode 100644 index 00000000..631111ff --- /dev/null +++ b/tests/unit/set2/set_insdelfind_michael.cpp @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#include "set2/set_insdelfind.h" + +namespace set2 { + CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_MichaelSet ) + CDSUNIT_TEST_MichaelSet + CPPUNIT_TEST_SUITE_END_PART() +} // namespace set2 diff --git a/tests/unit/set2/set_insdelfind_refinable.cpp b/tests/unit/set2/set_insdelfind_refinable.cpp new file mode 100644 index 00000000..942113e5 --- /dev/null +++ b/tests/unit/set2/set_insdelfind_refinable.cpp @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#include "set2/set_insdelfind.h" + +namespace set2 { + CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_RefinableSet ) + CDSUNIT_TEST_RefinableSet + CPPUNIT_TEST_SUITE_END_PART() +} // namespace set2 diff --git a/tests/unit/set2/set_insdelfind_skip.cpp b/tests/unit/set2/set_insdelfind_skip.cpp new file mode 100644 index 00000000..8e498651 --- /dev/null +++ b/tests/unit/set2/set_insdelfind_skip.cpp @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#include "set2/set_insdelfind.h" + +namespace set2 { + CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_SkipListSet ) + CDSUNIT_TEST_SkipListSet + CPPUNIT_TEST_SUITE_END_PART() +} // namespace set2 diff --git a/tests/unit/set2/set_insdelfind_split.cpp b/tests/unit/set2/set_insdelfind_split.cpp new file mode 100644 index 00000000..c16b8523 --- /dev/null +++ b/tests/unit/set2/set_insdelfind_split.cpp @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#include "set2/set_insdelfind.h" + +namespace set2 { + CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_SplitList ) + CDSUNIT_TEST_SplitList + CPPUNIT_TEST_SUITE_END_PART() +} // namespace set2 diff --git a/tests/unit/set2/set_insdelfind_std.cpp b/tests/unit/set2/set_insdelfind_std.cpp new file mode 100644 index 00000000..7543b88a --- /dev/null +++ b/tests/unit/set2/set_insdelfind_std.cpp @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#include "set2/set_insdelfind.h" + +namespace set2 { + CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_StdSet ) + CDSUNIT_TEST_StdSet + CPPUNIT_TEST_SUITE_END_PART() +} // namespace set2 diff --git a/tests/unit/set2/set_insdelfind_striped.cpp b/tests/unit/set2/set_insdelfind_striped.cpp new file mode 100644 index 00000000..f98d69f9 --- /dev/null +++ b/tests/unit/set2/set_insdelfind_striped.cpp @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#include "set2/set_insdelfind.h" + +namespace set2 { + CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_StripedSet ) + CDSUNIT_TEST_StripedSet + CPPUNIT_TEST_SUITE_END_PART() +} // namespace set2 -- 2.34.1