CPPUNIT_CHECK( pVal->nKey == nKey );
CPPUNIT_CHECK( pVal->nVal == nKey );
- CPPUNIT_ASSERT( s.extract( ep, nKey ));
+ ep = s.extract( nKey );
+ CPPUNIT_ASSERT( ep );
CPPUNIT_ASSERT( !ep.empty() );
CPPUNIT_CHECK( pVal->nKey == ep->nKey );
CPPUNIT_CHECK( pVal->nVal == (*ep).nVal );
{
rcu_lock l;
CPPUNIT_CHECK( s.get( nKey ) == nullptr );
- CPPUNIT_CHECK( !s.extract( ep, nKey ));
+ ep = s.extract( nKey );
+ CPPUNIT_CHECK( !ep );
CPPUNIT_CHECK( ep.empty() );
nKey = arr[i+1];
CPPUNIT_CHECK( pVal->nKey == nKey );
CPPUNIT_CHECK( pVal->nVal == nKey );
- CPPUNIT_ASSERT( s.extract_with( ep, other_item(nKey), other_less() ));
+ ep = s.extract_with( other_item( nKey ), other_less() );
+ CPPUNIT_ASSERT( ep );
CPPUNIT_ASSERT( !ep.empty() );
CPPUNIT_CHECK( pVal->nKey == ep->nKey );
CPPUNIT_CHECK( pVal->nVal == (*ep).nVal );
{
rcu_lock l;
CPPUNIT_CHECK( s.get_with( other_item( nKey ), other_less() ) == nullptr );
- CPPUNIT_CHECK( !s.extract_with( ep, other_item(nKey), other_less() ));
+ CPPUNIT_CHECK( !s.extract_with( other_item(nKey), other_less() ));
CPPUNIT_CHECK( ep.empty() );
}
}
{
rcu_lock l;
CPPUNIT_CHECK( s.get( int( nLimit / 2 ) ) == nullptr );
- CPPUNIT_CHECK( !s.extract( ep, int(nLimit / 2) ));
+ ep = s.extract( int( nLimit / 2 ) );
+ CPPUNIT_CHECK( !ep );
CPPUNIT_CHECK( ep.empty() );
}
}
CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
}
for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
+ iterator it2 = it;
+ CPPUNIT_CHECK( it2 == it );
+ CPPUNIT_CHECK( it2 != itEnd );
CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
it->nVal = (*it).nKey;
}
for ( int i = 0; size_t(i) < nMaxCount; ++i ) {
CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ));
}
+
+ {
+ typename Set::iterator it( s.begin() );
+ typename Set::const_iterator cit( s.cbegin() );
+ CPPUNIT_CHECK( it == cit );
+ CPPUNIT_CHECK( it != s.end() );
+ CPPUNIT_CHECK( it != s.cend() );
+ CPPUNIT_CHECK( cit != s.end() );
+ CPPUNIT_CHECK( cit != s.cend() );
+ ++it;
+ CPPUNIT_CHECK( it != cit );
+ CPPUNIT_CHECK( it != s.end() );
+ CPPUNIT_CHECK( it != s.cend() );
+ CPPUNIT_CHECK( cit != s.end() );
+ CPPUNIT_CHECK( cit != s.cend() );
+ ++cit;
+ CPPUNIT_CHECK( it == cit );
+ CPPUNIT_CHECK( it != s.end() );
+ CPPUNIT_CHECK( it != s.cend() );
+ CPPUNIT_CHECK( cit != s.end() );
+ CPPUNIT_CHECK( cit != s.cend() );
+ }
+
size_t nCount = 0;
for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
CPPUNIT_ASSERT_EX( (*it).nKey * 2 == it->nVal,
void Split_RCU_GPI_cmp();
void Split_RCU_GPI_less();
void Split_RCU_GPI_cmpmix();
+ void Split_RCU_GPI_cmpmix_stat();
void Split_RCU_GPB_cmp();
void Split_RCU_GPB_less();
void Split_RCU_GPB_cmpmix();
+ void Split_RCU_GPB_cmpmix_stat();
void Split_RCU_GPT_cmp();
void Split_RCU_GPT_less();
void Split_RCU_GPT_cmpmix();
+ void Split_RCU_GPT_cmpmix_stat();
void Split_RCU_SHB_cmp();
void Split_RCU_SHB_less();
void Split_RCU_SHB_cmpmix();
+ void Split_RCU_SHB_cmpmix_stat();
void Split_RCU_SHT_cmp();
void Split_RCU_SHT_less();
void Split_RCU_SHT_cmpmix();
+ void Split_RCU_SHT_cmpmix_stat();
void Split_nogc_cmp();
void Split_nogc_less();
void Split_Lazy_RCU_GPI_cmp();
void Split_Lazy_RCU_GPI_less();
void Split_Lazy_RCU_GPI_cmpmix();
+ void Split_Lazy_RCU_GPI_cmpmix_stat();
void Split_Lazy_RCU_GPB_cmp();
void Split_Lazy_RCU_GPB_less();
void Split_Lazy_RCU_GPB_cmpmix();
+ void Split_Lazy_RCU_GPB_cmpmix_stat();
void Split_Lazy_RCU_GPT_cmp();
void Split_Lazy_RCU_GPT_less();
void Split_Lazy_RCU_GPT_cmpmix();
+ void Split_Lazy_RCU_GPT_cmpmix_stat();
void Split_Lazy_RCU_SHB_cmp();
void Split_Lazy_RCU_SHB_less();
void Split_Lazy_RCU_SHB_cmpmix();
+ void Split_Lazy_RCU_SHB_cmpmix_stat();
void Split_Lazy_RCU_SHT_cmp();
void Split_Lazy_RCU_SHT_less();
void Split_Lazy_RCU_SHT_cmpmix();
+ void Split_Lazy_RCU_SHT_cmpmix_stat();
void Split_Lazy_nogc_cmp();
void Split_Lazy_nogc_less();
CPPUNIT_TEST(Split_RCU_GPI_cmp)
CPPUNIT_TEST(Split_RCU_GPI_less)
CPPUNIT_TEST(Split_RCU_GPI_cmpmix)
+ CPPUNIT_TEST( Split_RCU_GPI_cmpmix_stat )
CPPUNIT_TEST(Split_RCU_GPB_cmp)
CPPUNIT_TEST(Split_RCU_GPB_less)
CPPUNIT_TEST(Split_RCU_GPB_cmpmix)
+ CPPUNIT_TEST( Split_RCU_GPB_cmpmix_stat )
CPPUNIT_TEST(Split_RCU_GPT_cmp)
CPPUNIT_TEST(Split_RCU_GPT_less)
CPPUNIT_TEST(Split_RCU_GPT_cmpmix)
+ CPPUNIT_TEST( Split_RCU_GPT_cmpmix_stat )
CPPUNIT_TEST(Split_RCU_SHB_cmp)
CPPUNIT_TEST(Split_RCU_SHB_less)
CPPUNIT_TEST(Split_RCU_SHB_cmpmix)
+ CPPUNIT_TEST( Split_RCU_SHB_cmpmix_stat )
CPPUNIT_TEST(Split_RCU_SHT_cmp)
CPPUNIT_TEST(Split_RCU_SHT_less)
CPPUNIT_TEST(Split_RCU_SHT_cmpmix)
+ CPPUNIT_TEST( Split_RCU_SHT_cmpmix_stat )
CPPUNIT_TEST(Split_nogc_cmp)
CPPUNIT_TEST(Split_nogc_less)
CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmp)
CPPUNIT_TEST(Split_Lazy_RCU_GPI_less)
CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmpmix)
+ CPPUNIT_TEST( Split_Lazy_RCU_GPI_cmpmix_stat )
CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmp)
CPPUNIT_TEST(Split_Lazy_RCU_GPB_less)
CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmpmix)
+ CPPUNIT_TEST( Split_Lazy_RCU_GPB_cmpmix_stat )
CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmp)
CPPUNIT_TEST(Split_Lazy_RCU_GPT_less)
CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmpmix)
+ CPPUNIT_TEST( Split_Lazy_RCU_GPT_cmpmix_stat )
CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmp)
CPPUNIT_TEST(Split_Lazy_RCU_SHB_less)
CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmpmix)
+ CPPUNIT_TEST( Split_Lazy_RCU_SHB_cmpmix_stat )
CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmp)
CPPUNIT_TEST(Split_Lazy_RCU_SHT_less)
CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmpmix)
+ CPPUNIT_TEST( Split_Lazy_RCU_SHT_cmpmix_stat )
CPPUNIT_TEST(Split_Lazy_nogc_cmp)
CPPUNIT_TEST(Split_Lazy_nogc_less)