3 #ifndef __CDSTEST_HDR_SET_H
4 #define __CDSTEST_HDR_SET_H
6 #include "cppunit/cppunit_proxy.h"
7 #include "size_check.h"
9 #include <cds/opt/hash.h>
10 #include <cds/os/timer.h>
12 #include <algorithm> // random_shuffle
14 // forward namespace declaration
16 namespace container {}
21 using misc::check_size;
23 namespace cc = cds::container;
24 namespace co = cds::opt;
27 class HashSetHdrTest: public CppUnitMini::TestCase
32 unsigned int nFindCount ; // count of find-functor calling
33 unsigned int nEnsureNewCount;
34 unsigned int nEnsureCount;
38 memset( this, 0, sizeof(*this));
41 void copy( stat const& s )
43 nFindCount = s.nFindCount;
44 nEnsureCount = s.nEnsureCount;
45 nEnsureNewCount = s.nEnsureNewCount;
49 struct item: public stat
62 item (int key, int val )
67 item( std::pair<int,int> const& p )
77 item& operator=(item const& i)
87 #ifdef CDS_MOVE_SEMANTICS_SUPPORT
93 //item& operator=(item&& i)
113 size_t operator()( int i ) const
115 return co::v::hash<int>()( i );
118 size_t operator()( std::pair<int,int> const& i ) const
120 return co::v::hash<int>()( i.first );
123 template <typename Item>
124 size_t operator()( Item const& i ) const
126 return (*this)( i.key() );
130 struct simple_item_counter {
133 simple_item_counter()
152 operator size_t() const
158 template <typename T>
161 bool operator ()(const T& v1, const T& v2 ) const
163 return v1.key() < v2.key();
166 template <typename Q>
167 bool operator ()(const T& v1, const Q& v2 ) const
169 return v1.key() < v2;
172 template <typename Q>
173 bool operator ()(const Q& v1, const T& v2 ) const
175 return v1 < v2.key();
178 bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
180 return v1.first < v2.key();
183 bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
185 return v1.key() < v2.first;
192 other_item( int key )
204 template <typename T>
205 bool operator ()(T const& v1, other_item const& v2 ) const
207 return v1.key() < v2.nKey;
209 template <typename T>
210 bool operator ()(other_item const& v1, T const& v2 ) const
212 return v1.nKey < v2.key();
216 template <typename T>
218 int operator ()(const T& v1, const T& v2 ) const
220 if ( v1.key() < v2.key() )
222 return v1.key() > v2.key() ? 1 : 0;
225 template <typename Q>
226 int operator ()(const T& v1, const Q& v2 ) const
230 return v1.key() > v2 ? 1 : 0;
233 template <typename Q>
234 int operator ()(const Q& v1, const T& v2 ) const
238 return v1 > v2.key() ? 1 : 0;
241 int operator()( std::pair<int,int> const& v1, T const& v2 ) const
243 if ( v1.first < v2.key() )
245 return v1.first > v2.key() ? 1 : 0;
248 int operator()( T const& v1, std::pair<int,int> const& v2 ) const
250 if ( v1.key() < v2.first )
252 return v1.key() > v2.first ? 1 : 0;
256 template <typename T>
259 bool operator ()(const T& v1, const T& v2 ) const
261 return v1.key() == v2.key();
264 template <typename Q>
265 bool operator ()(const T& v1, const Q& v2 ) const
267 return v1.key() == v2;
270 template <typename Q>
271 bool operator ()(const Q& v1, const T& v2 ) const
273 return v1 == v2.key();
276 bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
278 return v1.first == v2.key();
281 bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
283 return v1.key() == v2.first;
289 template <typename Item, typename T>
290 void operator()( Item& i, T& val )
294 template <typename Item, typename T>
295 void operator()( Item& i, T const& val )
301 template <typename Item>
306 template <typename T>
307 void operator()( Item& i, T& /*val*/ )
312 void operator()( Item const& i )
318 struct insert_functor
320 template <typename Item>
321 void operator()(Item& i )
323 i.nVal = i.nKey * 100;
327 template <typename Item, typename Q>
328 static void ensure_func( bool bNew, Item& i, Q& /*val*/ )
336 struct ensure_functor
338 template <typename Item, typename Q>
339 void operator()( bool bNew, Item& i, Q& val )
341 ensure_func( bNew, i, val );
352 CPPUNIT_ASSERT( s.empty() );
354 const int nLimit = 100;
355 typename Set::guarded_ptr gp;
356 int arrRandom[nLimit];
357 for ( int i = 0; i < nLimit; ++i )
359 std::random_shuffle( arrRandom, arrRandom + nLimit );
361 for ( int i = 0; i < nLimit; ++i )
362 CPPUNIT_ASSERT( s.insert( arrRandom[i] ));
364 for ( int i = 0; i < nLimit; ++i ) {
365 int nKey = arrRandom[i];
366 CPPUNIT_ASSERT( s.get(gp, nKey ));
367 CPPUNIT_ASSERT( !gp.empty());
368 CPPUNIT_CHECK( gp->nKey == nKey );
369 CPPUNIT_CHECK( gp->nVal == nKey );
371 CPPUNIT_ASSERT( s.extract(gp, nKey));
372 CPPUNIT_ASSERT( !gp.empty());
373 CPPUNIT_CHECK( gp->nKey == nKey );
374 CPPUNIT_CHECK( gp->nVal == nKey );
375 CPPUNIT_CHECK( !s.get(gp, nKey));
378 CPPUNIT_CHECK( !s.extract(gp, nKey));
379 CPPUNIT_CHECK( gp.empty());
381 CPPUNIT_ASSERT( s.empty() );
384 for ( int i = 0; i < nLimit; ++i )
385 CPPUNIT_ASSERT( s.insert( arrRandom[i] ));
387 for ( int i = 0; i < nLimit; ++i ) {
388 int nKey = arrRandom[i];
389 CPPUNIT_ASSERT( s.get_with(gp, other_item(nKey), other_less() ));
390 CPPUNIT_ASSERT( !gp.empty());
391 CPPUNIT_CHECK( gp->nKey == nKey );
392 CPPUNIT_CHECK( gp->nVal == nKey );
394 CPPUNIT_ASSERT( s.extract_with(gp, other_item(nKey), other_less() ));
395 CPPUNIT_ASSERT( !gp.empty());
396 CPPUNIT_CHECK( gp->nKey == nKey );
397 CPPUNIT_CHECK( gp->nVal == nKey );
398 CPPUNIT_CHECK( !s.get_with(gp, other_item(nKey), other_less() ));
401 CPPUNIT_CHECK( !s.extract_with(gp, other_item(nKey), other_less() ));
402 CPPUNIT_CHECK( gp.empty());
404 CPPUNIT_ASSERT( s.empty() );
419 typedef typename Set::gc rcu;
420 typedef typename Set::rcu_lock rcu_lock;
421 typedef typename Set::value_type value_type;
422 typename Set::exempt_ptr ep;
424 static size_t const nLimit = 100;
426 for ( size_t i = 0; i < nLimit; ++i )
428 std::random_shuffle( arr, arr + nLimit );
430 for ( size_t i = 0; i < nLimit; ++i )
431 CPPUNIT_ASSERT( s.insert( arr[i] ));
433 for ( size_t i = 0; i < nLimit; i += 2 ) {
438 pVal = s.get( nKey );
439 CPPUNIT_ASSERT( pVal != nullptr );
440 CPPUNIT_CHECK( pVal->nKey == nKey );
441 CPPUNIT_CHECK( pVal->nVal == nKey );
443 CPPUNIT_ASSERT( s.extract( ep, nKey ));
444 CPPUNIT_ASSERT( !ep.empty() );
445 CPPUNIT_CHECK( pVal->nKey == ep->nKey );
446 CPPUNIT_CHECK( pVal->nVal == (*ep).nVal );
451 CPPUNIT_CHECK( s.get( nKey ) == nullptr );
452 CPPUNIT_CHECK( !s.extract( ep, nKey ));
453 CPPUNIT_CHECK( ep.empty() );
456 pVal = s.get_with( other_item(nKey), other_less() );
457 CPPUNIT_ASSERT( pVal != nullptr );
458 CPPUNIT_CHECK( pVal->nKey == nKey );
459 CPPUNIT_CHECK( pVal->nVal == nKey );
461 CPPUNIT_ASSERT( s.extract_with( ep, other_item(nKey), other_less() ));
462 CPPUNIT_ASSERT( !ep.empty() );
463 CPPUNIT_CHECK( pVal->nKey == ep->nKey );
464 CPPUNIT_CHECK( pVal->nVal == (*ep).nVal );
469 CPPUNIT_CHECK( s.get_with( other_item( nKey ), other_less() ) == nullptr );
470 CPPUNIT_CHECK( !s.extract_with( ep, other_item(nKey), other_less() ));
471 CPPUNIT_CHECK( ep.empty() );
474 CPPUNIT_CHECK( s.empty() );
475 CPPUNIT_CHECK( check_size( s, 0 ));
478 CPPUNIT_CHECK( s.get( int( nLimit / 2 ) ) == nullptr );
479 CPPUNIT_CHECK( !s.extract( ep, int(nLimit / 2) ));
480 CPPUNIT_CHECK( ep.empty() );
489 void test_int_with( Set& s)
491 typedef typename Set::value_type value_type;
497 CPPUNIT_ASSERT( !s.find( 10 ) );
498 CPPUNIT_ASSERT( s.insert( 10 ));
499 CPPUNIT_ASSERT( !s.empty() );
500 CPPUNIT_ASSERT( check_size( s, 1 ));
501 CPPUNIT_ASSERT( s.find( 10 ) );
503 CPPUNIT_ASSERT( !s.insert( 10 ));
504 CPPUNIT_ASSERT( !s.empty() );
505 CPPUNIT_ASSERT( check_size( s, 1 ));
507 CPPUNIT_ASSERT( !s.find_with( 20, less<value_type>() ) );
508 CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) ));
509 CPPUNIT_ASSERT( !s.empty() );
510 CPPUNIT_ASSERT( check_size( s, 2 ));
511 CPPUNIT_ASSERT( s.find_with( 10, less<value_type>() ) );
512 CPPUNIT_ASSERT( s.find( key = 20 ) );
513 CPPUNIT_ASSERT( s.find_with( key, less<value_type>(), find_functor() ) );
517 CPPUNIT_ASSERT( s.find( key, boost::ref(f) ) );
518 CPPUNIT_ASSERT( f.m_found.nKey == 20 );
519 CPPUNIT_ASSERT( f.m_found.nVal == 25 );
520 CPPUNIT_ASSERT( f.m_found.nFindCount == 1 );
522 CPPUNIT_ASSERT( s.find( key, find_functor() ) );
526 CPPUNIT_ASSERT( s.find_with( key, less<value_type>(), boost::ref(f) ) );
527 CPPUNIT_ASSERT( f.m_found.nKey == 20 );
528 CPPUNIT_ASSERT( f.m_found.nVal == 25 );
529 CPPUNIT_ASSERT( f.m_found.nFindCount == 2 );
531 CPPUNIT_ASSERT( !s.empty() );
532 CPPUNIT_ASSERT( check_size( s, 2 ));
534 CPPUNIT_ASSERT( !s.find( 25 ) );
535 CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() ));
536 CPPUNIT_ASSERT( !s.empty() );
537 CPPUNIT_ASSERT( check_size( s, 3 ));
541 CPPUNIT_ASSERT( s.find( key, boost::ref(f) ) );
542 CPPUNIT_ASSERT( f.m_found.nKey == 25 );
543 CPPUNIT_ASSERT( f.m_found.nVal == 2500 );
550 CPPUNIT_ASSERT( s.find( key, boost::ref(f) ) );
551 CPPUNIT_ASSERT( f.m_found.nKey == 10 );
552 CPPUNIT_ASSERT( f.m_found.nVal == 10 );
553 CPPUNIT_ASSERT( f.m_found.nEnsureCount == 0 );
554 CPPUNIT_ASSERT( f.m_found.nEnsureNewCount == 0 );
556 std::pair<bool, bool> ensureResult = s.ensure( key, ensure_functor() );
557 CPPUNIT_ASSERT( ensureResult.first && !ensureResult.second );
558 CPPUNIT_ASSERT( !s.empty() );
559 CPPUNIT_ASSERT( check_size( s, 3 ));
562 CPPUNIT_ASSERT( s.find( key, boost::ref(f) ) );
563 CPPUNIT_ASSERT( f.m_found.nKey == 10 );
564 CPPUNIT_ASSERT( f.m_found.nVal == 10 );
565 CPPUNIT_ASSERT( f.m_found.nEnsureCount == 1 );
566 CPPUNIT_ASSERT( f.m_found.nEnsureNewCount == 0 );
569 ensureResult = s.ensure( std::make_pair(13, 1300), ensure_functor() );
570 CPPUNIT_ASSERT( ensureResult.first && ensureResult.second );
571 CPPUNIT_ASSERT( !s.empty() );
572 CPPUNIT_ASSERT( check_size( s, 4 ));
576 CPPUNIT_ASSERT( s.find( key, boost::ref(f) ) );
577 CPPUNIT_ASSERT( f.m_found.nKey == 13 );
578 CPPUNIT_ASSERT( f.m_found.nVal == 1300 );
579 CPPUNIT_ASSERT( f.m_found.nEnsureCount == 0 );
580 CPPUNIT_ASSERT( f.m_found.nEnsureNewCount == 1 );
584 CPPUNIT_ASSERT( s.erase(13) );
585 CPPUNIT_ASSERT( !s.find( 13 ));
586 CPPUNIT_ASSERT( !s.empty() );
587 CPPUNIT_ASSERT( check_size( s, 3 ));
588 CPPUNIT_ASSERT( !s.erase(13) );
589 CPPUNIT_ASSERT( !s.empty() );
590 CPPUNIT_ASSERT( check_size( s, 3 ));
592 CPPUNIT_ASSERT( s.find( 10 ));
593 CPPUNIT_ASSERT( s.erase_with( 10, less<value_type>() ));
594 CPPUNIT_ASSERT( !s.find( 10 ));
595 CPPUNIT_ASSERT( !s.empty() );
596 CPPUNIT_ASSERT( check_size( s, 2 ));
597 CPPUNIT_ASSERT( !s.erase_with(10, less<value_type>()) );
598 CPPUNIT_ASSERT( !s.empty() );
599 CPPUNIT_ASSERT( check_size( s, 2 ));
601 CPPUNIT_ASSERT( s.find(20) );
604 CPPUNIT_ASSERT( s.erase( 20, boost::ref(f) ));
605 CPPUNIT_ASSERT( f.m_found.nKey == 20 );
606 CPPUNIT_ASSERT( f.m_found.nVal == 25 );
608 CPPUNIT_ASSERT( s.insert(235))
609 CPPUNIT_ASSERT( s.erase_with( 235, less<value_type>(), boost::ref(f) ));
610 CPPUNIT_ASSERT( f.m_found.nKey == 235 );
611 CPPUNIT_ASSERT( f.m_found.nVal == 235 );
613 CPPUNIT_ASSERT( !s.find( 20 ));
614 CPPUNIT_ASSERT( !s.empty() );
615 CPPUNIT_ASSERT( check_size( s, 1 ));
618 CPPUNIT_ASSERT( s.empty() );
619 CPPUNIT_ASSERT( check_size( s, 0 ));
621 # ifdef CDS_EMPLACE_SUPPORT
623 CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151
624 CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471
625 CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91
626 CPPUNIT_ASSERT( !s.empty() );
627 CPPUNIT_ASSERT( check_size( s, 3 ));
629 CPPUNIT_ASSERT( s.find(151));
630 CPPUNIT_ASSERT( s.find_with(174, less<value_type>()));
631 CPPUNIT_ASSERT( s.find(190));
636 CPPUNIT_ASSERT( s.find( key, boost::ref(f) ) );
637 CPPUNIT_ASSERT( f.m_found.nKey == 151 );
638 CPPUNIT_ASSERT( f.m_found.nVal == 151 );
641 CPPUNIT_ASSERT( s.find( key, boost::ref(f) ) );
642 CPPUNIT_ASSERT( f.m_found.nKey == 174 );
643 CPPUNIT_ASSERT( f.m_found.nVal == 471 );
646 CPPUNIT_ASSERT( s.find( key, boost::ref(f) ) );
647 CPPUNIT_ASSERT( f.m_found.nKey == 190 );
648 CPPUNIT_ASSERT( f.m_found.nVal == 91 );
652 CPPUNIT_ASSERT( s.empty() );
653 CPPUNIT_ASSERT( check_size( s, 0 ));
661 typedef typename Set::value_type value_type;
662 typedef typename Set::iterator iterator;
663 typedef typename Set::const_iterator const_iterator;
669 CPPUNIT_ASSERT( s.empty() );
670 CPPUNIT_ASSERT( check_size( s, 0 ));
674 CPPUNIT_ASSERT( it != s.end() );
675 CPPUNIT_ASSERT( it->key() == 10 );
676 CPPUNIT_ASSERT( it->val() == 10 );
677 CPPUNIT_ASSERT( !s.empty() );
678 CPPUNIT_ASSERT( check_size( s, 1 ));
679 CPPUNIT_ASSERT( s.insert( 10 ) == s.end() );
681 it = s.insert( std::make_pair( 50, 25 ));
682 CPPUNIT_ASSERT( it != s.end() );
683 CPPUNIT_ASSERT( it->key() == 50 );
684 CPPUNIT_ASSERT( it->val() == 25 );
685 CPPUNIT_ASSERT( !s.empty() );
686 CPPUNIT_ASSERT( check_size( s, 2 ));
687 CPPUNIT_ASSERT( s.insert( 50 ) == s.end() );
690 std::pair< iterator, bool> ensureResult;
691 ensureResult = s.ensure( 20 );
692 CPPUNIT_ASSERT( ensureResult.first != s.end() );
693 CPPUNIT_ASSERT( ensureResult.second );
694 CPPUNIT_ASSERT( ensureResult.first->key() == 20 );
695 CPPUNIT_ASSERT( ensureResult.first->val() == 20 );
696 CPPUNIT_ASSERT( !s.empty() );
697 CPPUNIT_ASSERT( check_size( s, 3 ));
699 ensureResult = s.ensure( std::make_pair( 20, 200 ));
700 CPPUNIT_ASSERT( ensureResult.first != s.end() );
701 CPPUNIT_ASSERT( !ensureResult.second );
702 CPPUNIT_ASSERT( ensureResult.first->key() == 20 );
703 CPPUNIT_ASSERT( ensureResult.first->val() == 20 );
704 CPPUNIT_ASSERT( !s.empty() );
705 CPPUNIT_ASSERT( check_size( s, 3 ));
706 ensureResult.first->nVal = 22;
708 ensureResult = s.ensure( std::make_pair( 30, 33 ));
709 CPPUNIT_ASSERT( ensureResult.first != s.end() );
710 CPPUNIT_ASSERT( ensureResult.second );
711 CPPUNIT_ASSERT( ensureResult.first->key() == 30 );
712 CPPUNIT_ASSERT( ensureResult.first->val() == 33 );
713 CPPUNIT_ASSERT( !s.empty() );
714 CPPUNIT_ASSERT( check_size( s, 4 ));
718 CPPUNIT_ASSERT( it != s.end() );
719 CPPUNIT_ASSERT( it->key() == 10 );
720 CPPUNIT_ASSERT( it->val() == 10 );
722 it = s.find_with( 20, less<value_type>() );
723 CPPUNIT_ASSERT( it != s.end() );
724 CPPUNIT_ASSERT( it->key() == 20 );
725 CPPUNIT_ASSERT( it->val() == 22 );
728 CPPUNIT_ASSERT( it != s.end() );
729 CPPUNIT_ASSERT( it->key() == 30 );
730 CPPUNIT_ASSERT( it->val() == 33 );
733 CPPUNIT_ASSERT( it == s.end() );
736 CPPUNIT_ASSERT( it != s.end() );
737 CPPUNIT_ASSERT( it->key() == 50 );
738 CPPUNIT_ASSERT( it->val() == 25 );
740 # ifdef CDS_EMPLACE_SUPPORT
742 it = s.emplace( 151 ) ; // key = 151, val = 151
743 CPPUNIT_ASSERT( it != s.end() );
744 CPPUNIT_ASSERT( it->key() == 151 );
745 CPPUNIT_ASSERT( it->val() == 151 );
747 it = s.emplace( 174, 471 ) ; // key == 174, val = 471
748 CPPUNIT_ASSERT( it != s.end() );
749 CPPUNIT_ASSERT( it->key() == 174 );
750 CPPUNIT_ASSERT( it->val() == 471 );
752 it = s.emplace( std::make_pair( 190, 91 )) ; // key == 190, val = 91
753 CPPUNIT_ASSERT( it != s.end() );
754 CPPUNIT_ASSERT( it->key() == 190 );
755 CPPUNIT_ASSERT( it->val() == 91 );
758 CPPUNIT_ASSERT( it != s.end() );
759 CPPUNIT_ASSERT( it->key() == 174 );
760 CPPUNIT_ASSERT( it->val() == 471 );
762 it = s.find_with( 190, less<value_type>() );
763 CPPUNIT_ASSERT( it != s.end() );
764 CPPUNIT_ASSERT( it->key() == 190 );
765 CPPUNIT_ASSERT( it->val() == 91 );
768 CPPUNIT_ASSERT( it != s.end() );
769 CPPUNIT_ASSERT( it->key() == 151 );
770 CPPUNIT_ASSERT( it->val() == 151 );
774 //CPPUNIT_ASSERT( s.empty() );
775 //CPPUNIT_ASSERT( check_size( s, 0 ));
782 for ( int i = 0; i < 500; ++i ) {
783 CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
785 for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
786 CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
787 it->nVal = (*it).nKey;
790 Set const& refSet = s;
791 for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) {
792 CPPUNIT_ASSERT( (*it).nKey == it->nVal );
800 typedef typename Set::value_type value_type;
801 typedef typename Set::iterator iterator;
802 typedef typename Set::const_iterator const_iterator;
806 const size_t nMaxCount = 500;
807 for ( int i = 0; size_t(i) < nMaxCount; ++i ) {
808 CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ));
811 for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
812 CPPUNIT_ASSERT_EX( (*it).nKey * 2 == it->nVal,
813 "Step " << nCount << ": Iterator key=" << it->nKey << ", value expected=" << it->nKey * 2 << ", value real=" << it->nVal
815 it->nVal = (*it).nKey;
818 CPPUNIT_ASSERT( nCount == nMaxCount );
821 Set const& refSet = s;
822 for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) {
823 CPPUNIT_ASSERT_EX( (*it).nKey == it->nVal,
824 "Step " << nCount << ": Iterator key=" << it->nKey << ", value expected=" << it->nKey << ", value real=" << it->nVal
828 CPPUNIT_ASSERT( nCount == nMaxCount );
831 void Michael_HP_cmp();
832 void Michael_HP_less();
833 void Michael_HP_cmpmix();
835 void Michael_PTB_cmp();
836 void Michael_PTB_less();
837 void Michael_PTB_cmpmix();
839 void Michael_HRC_cmp();
840 void Michael_HRC_less();
841 void Michael_HRC_cmpmix();
843 void Michael_RCU_GPI_cmp();
844 void Michael_RCU_GPI_less();
845 void Michael_RCU_GPI_cmpmix();
847 void Michael_RCU_GPT_cmp();
848 void Michael_RCU_GPT_less();
849 void Michael_RCU_GPT_cmpmix();
851 void Michael_RCU_GPB_cmp();
852 void Michael_RCU_GPB_less();
853 void Michael_RCU_GPB_cmpmix();
855 void Michael_RCU_SHT_cmp();
856 void Michael_RCU_SHT_less();
857 void Michael_RCU_SHT_cmpmix();
859 void Michael_RCU_SHB_cmp();
860 void Michael_RCU_SHB_less();
861 void Michael_RCU_SHB_cmpmix();
863 void Michael_nogc_cmp();
864 void Michael_nogc_less();
865 void Michael_nogc_cmpmix();
869 void Lazy_HP_cmpmix();
872 void Lazy_PTB_less();
873 void Lazy_PTB_cmpmix();
876 void Lazy_HRC_less();
877 void Lazy_HRC_cmpmix();
879 void Lazy_RCU_GPI_cmp();
880 void Lazy_RCU_GPI_less();
881 void Lazy_RCU_GPI_cmpmix();
883 void Lazy_RCU_GPB_cmp();
884 void Lazy_RCU_GPB_less();
885 void Lazy_RCU_GPB_cmpmix();
887 void Lazy_RCU_GPT_cmp();
888 void Lazy_RCU_GPT_less();
889 void Lazy_RCU_GPT_cmpmix();
891 void Lazy_RCU_SHB_cmp();
892 void Lazy_RCU_SHB_less();
893 void Lazy_RCU_SHB_cmpmix();
895 void Lazy_RCU_SHT_cmp();
896 void Lazy_RCU_SHT_less();
897 void Lazy_RCU_SHT_cmpmix();
899 void Lazy_nogc_cmp();
900 void Lazy_nogc_less();
901 void Lazy_nogc_cmpmix();
904 void Split_HP_less();
905 void Split_HP_cmpmix();
907 void Split_PTB_cmp();
908 void Split_PTB_less();
909 void Split_PTB_cmpmix();
911 void Split_HRC_cmp();
912 void Split_HRC_less();
913 void Split_HRC_cmpmix();
915 void Split_RCU_GPI_cmp();
916 void Split_RCU_GPI_less();
917 void Split_RCU_GPI_cmpmix();
919 void Split_RCU_GPB_cmp();
920 void Split_RCU_GPB_less();
921 void Split_RCU_GPB_cmpmix();
923 void Split_RCU_GPT_cmp();
924 void Split_RCU_GPT_less();
925 void Split_RCU_GPT_cmpmix();
927 void Split_RCU_SHB_cmp();
928 void Split_RCU_SHB_less();
929 void Split_RCU_SHB_cmpmix();
931 void Split_RCU_SHT_cmp();
932 void Split_RCU_SHT_less();
933 void Split_RCU_SHT_cmpmix();
935 void Split_nogc_cmp();
936 void Split_nogc_less();
937 void Split_nogc_cmpmix();
940 void Split_Lazy_HP_cmp();
941 void Split_Lazy_HP_less();
942 void Split_Lazy_HP_cmpmix();
944 void Split_Lazy_PTB_cmp();
945 void Split_Lazy_PTB_less();
946 void Split_Lazy_PTB_cmpmix();
948 void Split_Lazy_HRC_cmp();
949 void Split_Lazy_HRC_less();
950 void Split_Lazy_HRC_cmpmix();
952 void Split_Lazy_RCU_GPI_cmp();
953 void Split_Lazy_RCU_GPI_less();
954 void Split_Lazy_RCU_GPI_cmpmix();
956 void Split_Lazy_RCU_GPB_cmp();
957 void Split_Lazy_RCU_GPB_less();
958 void Split_Lazy_RCU_GPB_cmpmix();
960 void Split_Lazy_RCU_GPT_cmp();
961 void Split_Lazy_RCU_GPT_less();
962 void Split_Lazy_RCU_GPT_cmpmix();
964 void Split_Lazy_RCU_SHB_cmp();
965 void Split_Lazy_RCU_SHB_less();
966 void Split_Lazy_RCU_SHB_cmpmix();
968 void Split_Lazy_RCU_SHT_cmp();
969 void Split_Lazy_RCU_SHT_less();
970 void Split_Lazy_RCU_SHT_cmpmix();
972 void Split_Lazy_nogc_cmp();
973 void Split_Lazy_nogc_less();
974 void Split_Lazy_nogc_cmpmix();
976 CPPUNIT_TEST_SUITE(HashSetHdrTest)
977 CPPUNIT_TEST(Michael_HP_cmp)
978 CPPUNIT_TEST(Michael_HP_less)
979 CPPUNIT_TEST(Michael_HP_cmpmix)
981 CPPUNIT_TEST(Michael_PTB_cmp)
982 CPPUNIT_TEST(Michael_PTB_less)
983 CPPUNIT_TEST(Michael_PTB_cmpmix)
985 CPPUNIT_TEST(Michael_HRC_cmp)
986 CPPUNIT_TEST(Michael_HRC_less)
987 CPPUNIT_TEST(Michael_HRC_cmpmix)
989 CPPUNIT_TEST(Michael_RCU_GPI_cmp)
990 CPPUNIT_TEST(Michael_RCU_GPI_less)
991 CPPUNIT_TEST(Michael_RCU_GPI_cmpmix)
993 CPPUNIT_TEST(Michael_RCU_GPB_cmp)
994 CPPUNIT_TEST(Michael_RCU_GPB_less)
995 CPPUNIT_TEST(Michael_RCU_GPB_cmpmix)
997 CPPUNIT_TEST(Michael_RCU_GPT_cmp)
998 CPPUNIT_TEST(Michael_RCU_GPT_less)
999 CPPUNIT_TEST(Michael_RCU_GPT_cmpmix)
1001 CPPUNIT_TEST(Michael_RCU_SHB_cmp)
1002 CPPUNIT_TEST(Michael_RCU_SHB_less)
1003 CPPUNIT_TEST(Michael_RCU_SHB_cmpmix)
1005 CPPUNIT_TEST(Michael_RCU_SHT_cmp)
1006 CPPUNIT_TEST(Michael_RCU_SHT_less)
1007 CPPUNIT_TEST(Michael_RCU_SHT_cmpmix)
1009 CPPUNIT_TEST(Michael_nogc_cmp)
1010 CPPUNIT_TEST(Michael_nogc_less)
1011 CPPUNIT_TEST(Michael_nogc_cmpmix)
1013 CPPUNIT_TEST(Lazy_HP_cmp)
1014 CPPUNIT_TEST(Lazy_HP_less)
1015 CPPUNIT_TEST(Lazy_HP_cmpmix)
1017 CPPUNIT_TEST(Lazy_PTB_cmp)
1018 CPPUNIT_TEST(Lazy_PTB_less)
1019 CPPUNIT_TEST(Lazy_PTB_cmpmix)
1021 CPPUNIT_TEST(Lazy_HRC_cmp)
1022 CPPUNIT_TEST(Lazy_HRC_less)
1023 CPPUNIT_TEST(Lazy_HRC_cmpmix)
1025 CPPUNIT_TEST(Lazy_RCU_GPI_cmp)
1026 CPPUNIT_TEST(Lazy_RCU_GPI_less)
1027 CPPUNIT_TEST(Lazy_RCU_GPI_cmpmix)
1029 CPPUNIT_TEST(Lazy_RCU_GPB_cmp)
1030 CPPUNIT_TEST(Lazy_RCU_GPB_less)
1031 CPPUNIT_TEST(Lazy_RCU_GPB_cmpmix)
1033 CPPUNIT_TEST(Lazy_RCU_GPT_cmp)
1034 CPPUNIT_TEST(Lazy_RCU_GPT_less)
1035 CPPUNIT_TEST(Lazy_RCU_GPT_cmpmix)
1037 CPPUNIT_TEST(Lazy_RCU_SHB_cmp)
1038 CPPUNIT_TEST(Lazy_RCU_SHB_less)
1039 CPPUNIT_TEST(Lazy_RCU_SHB_cmpmix)
1041 CPPUNIT_TEST(Lazy_RCU_SHT_cmp)
1042 CPPUNIT_TEST(Lazy_RCU_SHT_less)
1043 CPPUNIT_TEST(Lazy_RCU_SHT_cmpmix)
1045 CPPUNIT_TEST(Lazy_nogc_cmp)
1046 CPPUNIT_TEST(Lazy_nogc_less)
1047 CPPUNIT_TEST(Lazy_nogc_cmpmix)
1049 CPPUNIT_TEST(Split_HP_cmp)
1050 CPPUNIT_TEST(Split_HP_less)
1051 CPPUNIT_TEST(Split_HP_cmpmix)
1053 CPPUNIT_TEST(Split_PTB_cmp)
1054 CPPUNIT_TEST(Split_PTB_less)
1055 CPPUNIT_TEST(Split_PTB_cmpmix)
1057 CPPUNIT_TEST(Split_HRC_cmp)
1058 CPPUNIT_TEST(Split_HRC_less)
1059 CPPUNIT_TEST(Split_HRC_cmpmix)
1061 CPPUNIT_TEST(Split_RCU_GPI_cmp)
1062 CPPUNIT_TEST(Split_RCU_GPI_less)
1063 CPPUNIT_TEST(Split_RCU_GPI_cmpmix)
1065 CPPUNIT_TEST(Split_RCU_GPB_cmp)
1066 CPPUNIT_TEST(Split_RCU_GPB_less)
1067 CPPUNIT_TEST(Split_RCU_GPB_cmpmix)
1069 CPPUNIT_TEST(Split_RCU_GPT_cmp)
1070 CPPUNIT_TEST(Split_RCU_GPT_less)
1071 CPPUNIT_TEST(Split_RCU_GPT_cmpmix)
1073 CPPUNIT_TEST(Split_RCU_SHB_cmp)
1074 CPPUNIT_TEST(Split_RCU_SHB_less)
1075 CPPUNIT_TEST(Split_RCU_SHB_cmpmix)
1077 CPPUNIT_TEST(Split_RCU_SHT_cmp)
1078 CPPUNIT_TEST(Split_RCU_SHT_less)
1079 CPPUNIT_TEST(Split_RCU_SHT_cmpmix)
1081 CPPUNIT_TEST(Split_nogc_cmp)
1082 CPPUNIT_TEST(Split_nogc_less)
1083 CPPUNIT_TEST(Split_nogc_cmpmix)
1085 CPPUNIT_TEST(Split_Lazy_HP_cmp)
1086 CPPUNIT_TEST(Split_Lazy_HP_less)
1087 CPPUNIT_TEST(Split_Lazy_HP_cmpmix)
1089 CPPUNIT_TEST(Split_Lazy_PTB_cmp)
1090 CPPUNIT_TEST(Split_Lazy_PTB_less)
1091 CPPUNIT_TEST(Split_Lazy_PTB_cmpmix)
1093 CPPUNIT_TEST(Split_Lazy_HRC_cmp)
1094 CPPUNIT_TEST(Split_Lazy_HRC_less)
1095 CPPUNIT_TEST(Split_Lazy_HRC_cmpmix)
1097 CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmp)
1098 CPPUNIT_TEST(Split_Lazy_RCU_GPI_less)
1099 CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmpmix)
1101 CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmp)
1102 CPPUNIT_TEST(Split_Lazy_RCU_GPB_less)
1103 CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmpmix)
1105 CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmp)
1106 CPPUNIT_TEST(Split_Lazy_RCU_GPT_less)
1107 CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmpmix)
1109 CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmp)
1110 CPPUNIT_TEST(Split_Lazy_RCU_SHB_less)
1111 CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmpmix)
1113 CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmp)
1114 CPPUNIT_TEST(Split_Lazy_RCU_SHT_less)
1115 CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmpmix)
1117 CPPUNIT_TEST(Split_Lazy_nogc_cmp)
1118 CPPUNIT_TEST(Split_Lazy_nogc_less)
1119 CPPUNIT_TEST(Split_Lazy_nogc_cmpmix)
1121 CPPUNIT_TEST_SUITE_END()
1127 #endif // __CDSTEST_HDR_SET_H