exempt_ptr xp;
// extract_min
- for ( int i = 0; i < sizeof(keys) / sizeof(keys[0]); ++i )
+ for ( int i = 0; i < static_cast<int>(sizeof(keys) / sizeof(keys[0])); ++i )
CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep ));
+ CPPUNIT_CHECK( s.check_consistency( check_functor() ));
xp = s.extract_min();
CPPUNIT_ASSERT( xp );
CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0]));
// extract_min<Func>
- for ( int i = 0; i < sizeof(keys) / sizeof(keys[0]); ++i )
+ for ( int i = 0; i < static_cast<int>(sizeof(keys) / sizeof(keys[0])); ++i )
CPPUNIT_ASSERT( s.insert( keys[i], keys[i] * c_nStep ));
+ CPPUNIT_CHECK( s.check_consistency( check_functor() ));
nCount = 1;
xp = s.extract_min( [&keyPrev]( key_type k ){ keyPrev = k; });
CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0]));
// extract_min_key
- for ( int i = 0; i < sizeof(keys) / sizeof(keys[0]); ++i )
+ for ( int i = 0; i < static_cast<int>(sizeof(keys) / sizeof(keys[0])); ++i )
CPPUNIT_ASSERT( s.insert( keys[i], keys[i] * c_nStep ));
+ CPPUNIT_CHECK( s.check_consistency( check_functor() ));
nCount = 1;
xp = s.extract_min_key( keyPrev );
CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0]));
// extract_max
- for ( int i = 0; i < sizeof(keys) / sizeof(keys[0]); ++i )
+ for ( int i = 0; i < static_cast<int>(sizeof(keys) / sizeof(keys[0])); ++i )
CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep ));
+ CPPUNIT_CHECK( s.check_consistency( check_functor() ));
nCount = 1;
xp = s.extract_max();
CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0]));
// extract_max<Func>
- for ( int i = 0; i < sizeof(keys) / sizeof(keys[0]); ++i )
+ for ( int i = 0; i < static_cast<int>(sizeof(keys) / sizeof(keys[0])); ++i )
CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep ));
+ CPPUNIT_CHECK( s.check_consistency( check_functor() ));
nCount = 1;
xp = s.extract_max( [&keyPrev]( key_type k ){ keyPrev = k; });
CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0]));
// extract_max_key
- for ( int i = 0; i < sizeof(keys) / sizeof(keys[0]); ++i )
+ for ( int i = 0; i < static_cast<int>(sizeof(keys) / sizeof(keys[0])); ++i )
CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep ));
+ CPPUNIT_CHECK( s.check_consistency( check_functor() ));
nCount = 1;
xp = s.extract_max_key( keyPrev );
CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0]));
// extract
- for ( int i = 0; i < sizeof(keys) / sizeof(keys[0]); ++i )
+ for ( int i = 0; i < static_cast<int>(sizeof(keys) / sizeof(keys[0])); ++i )
CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep ));
+ CPPUNIT_CHECK( s.check_consistency( check_functor() ));
- for ( int i = 0; i < sizeof( keys ) / sizeof( keys[0] ); ++i ) {
+ for ( int i = 0; i < static_cast<int>(sizeof( keys ) / sizeof( keys[0] )); ++i ) {
xp = s.extract(keys[i]);
CPPUNIT_CHECK_EX( xp->nVal == keys[i] * c_nStep, "Expected value=" << keys[i] * c_nStep << " real=" << xp->nVal );
}
// extract_with
- for ( int i = 0; i < sizeof(keys) / sizeof(keys[0]); ++i )
+ for ( int i = 0; i < static_cast<int>(sizeof(keys) / sizeof(keys[0])); ++i )
CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep ));
+ CPPUNIT_CHECK( s.check_consistency( check_functor() ));
- for ( int i = 0; i < sizeof( keys ) / sizeof( keys[0] ); ++i ) {
+ for ( int i = 0; i < static_cast<int>(sizeof( keys ) / sizeof( keys[0] )); ++i ) {
xp = s.extract_with( wrapped_int(keys[i]), wrapped_less());
CPPUNIT_CHECK_EX( xp->nVal == keys[i] * c_nStep, "Expected value=" << keys[i] * c_nStep << " real=" << xp->nVal );
}