Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSUNIT_STRIPED_MAP_TEST_STRIPED_MAP_H
{
bool operator()( Map& m, int key ) const
{
- return m.contains( cds_test::striped_map_fixture::other_item( key ), cds_test::striped_map_fixture::other_less() );
+ return m.contains( cds_test::striped_map_fixture::other_item( key ), cds_test::striped_map_fixture::other_less());
}
};
{
bool operator()( Map& m, int key ) const
{
- return m.erase_with( cds_test::striped_map_fixture::other_item( key ), cds_test::striped_map_fixture::other_less() );
+ return m.erase_with( cds_test::striped_map_fixture::other_item( key ), cds_test::striped_map_fixture::other_less());
}
template <typename Func>
ASSERT_FALSE( m.contains( i.nKey ));
ASSERT_FALSE( m.contains( i ));
- ASSERT_FALSE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey ) ));
+ ASSERT_FALSE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey )));
ASSERT_FALSE( m.find( i, []( map_pair const& ) {
ASSERT_TRUE( false );
} ));
v.second.nVal = v.first.nKey;
v.second.strVal = std::to_string( v.first.nKey );
} ));
- ASSERT_FALSE( m.insert_with( i, []( map_pair& v ) {
+ ASSERT_FALSE( m.insert_with( i, []( map_pair& ) {
EXPECT_TRUE( false );
} ));
break;
v.second.nVal = v.first.nKey;
v.second.strVal = std::to_string( v.first.nKey );
} ));
- ASSERT_FALSE( m.insert_with( i.nKey, []( map_pair& v ) {
+ ASSERT_FALSE( m.insert_with( i.nKey, []( map_pair& ) {
EXPECT_TRUE( false );
} ));
break;
v.second.nVal = v.first.nKey;
v.second.strVal = std::to_string( v.first.nKey );
} ));
- ASSERT_FALSE( m.insert_with( val.strVal, []( map_pair& v ) {
+ ASSERT_FALSE( m.insert_with( val.strVal, []( map_pair& ) {
EXPECT_TRUE( false );
} ));
break;
ASSERT_TRUE( m.contains( i.nKey ));
ASSERT_TRUE( m.contains( i ));
- ASSERT_TRUE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey ) ));
+ ASSERT_TRUE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey )));
ASSERT_TRUE( m.find( i, []( map_pair const& v ) {
EXPECT_EQ( v.first.nKey, v.second.nVal );
EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
} )));
}
- ASSERT_FALSE( m.empty() );
+ ASSERT_FALSE( m.empty());
ASSERT_CONTAINER_SIZE( m, kkSize );
- shuffle( arrKeys.begin(), arrKeys.end() );
+ shuffle( arrKeys.begin(), arrKeys.end());
// erase/find
for ( auto const& i : arrKeys ) {
- value_type const& val( arrVals.at( i.nKey ) );
+ value_type const& val( arrVals.at( i.nKey ));
ASSERT_TRUE( m.contains( i.nKey ));
- ASSERT_TRUE( m.contains( val.strVal ) );
+ ASSERT_TRUE( m.contains( val.strVal ));
ASSERT_TRUE( m.contains( i ));
ASSERT_TRUE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey )));
ASSERT_TRUE( m.find( i, []( map_pair const& v ) {
EXPECT_TRUE( false );
} )));
}
- ASSERT_TRUE( m.empty() );
+ ASSERT_TRUE( m.empty());
ASSERT_CONTAINER_SIZE( m, 0 );
// clear
for ( auto const& i : arrKeys )
ASSERT_TRUE( m.insert( i ));
- ASSERT_FALSE( m.empty() );
+ ASSERT_FALSE( m.empty());
ASSERT_CONTAINER_SIZE( m, kkSize );
m.clear();
- ASSERT_TRUE( m.empty() );
+ ASSERT_TRUE( m.empty());
ASSERT_CONTAINER_SIZE( m, 0 );
}
};
cds::opt::resizing_policy< cc::striped_set::load_factor_resizing<0>>
> map_type;
- map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+ map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
this->test( m );
}
cds::opt::copy_policy< cc::striped_set::move_item >
> map_type;
- map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+ map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
this->test( m );
}
cds::opt::resizing_policy< cc::striped_set::load_factor_resizing<0>>
> map_type;
- map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+ map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
this->test( m );
}
cds::opt::copy_policy< cc::striped_set::move_item >
> map_type;
- map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+ map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
this->test( m );
}