EXPECT_FALSE( updResult.second );
break;
case 1:
- EXPECT_EQ( i.nUpdateNewCount, 0 );
+ EXPECT_EQ( i.nUpdateNewCount, 0u );
ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
- EXPECT_EQ( i.nUpdateNewCount, 1 );
+ EXPECT_EQ( i.nUpdateNewCount, 1u );
ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ) );
- EXPECT_EQ( i.nUpdateNewCount, 1 );
+ EXPECT_EQ( i.nUpdateNewCount, 1u );
i.nUpdateNewCount = 0;
break;
case 2:
ASSERT_TRUE( s.contains( i.nKey ) );
ASSERT_TRUE( s.contains( i ) );
ASSERT_TRUE( s.contains( other_item( i.key() ), other_less()));
- EXPECT_EQ( i.nFindCount, 0 );
+ EXPECT_EQ( i.nFindCount, 0u );
ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
- EXPECT_EQ( i.nFindCount, 2 );
+ EXPECT_EQ( i.nFindCount, 2u );
}
ASSERT_FALSE( s.empty() );
ASSERT_CONTAINER_SIZE( s, nSetSize );
ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_less() ) );
break;
case 4:
- EXPECT_EQ( i.nEraseCount, 0 );
+ EXPECT_EQ( i.nEraseCount, 0u );
ASSERT_TRUE( s.erase( v, []( value_type& val ) { ++val.nEraseCount; } ));
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
ASSERT_FALSE( s.erase( v, []( value_type& val ) { ++val.nEraseCount; } ));
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
break;
case 5:
- EXPECT_EQ( i.nEraseCount, 0 );
+ EXPECT_EQ( i.nEraseCount, 0u );
ASSERT_TRUE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
break;
}
ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
}
ASSERT_TRUE( s.empty() );
- ASSERT_CONTAINER_SIZE( s, 0 );
+ ASSERT_CONTAINER_SIZE( s, 0u );
// Force retiring cycle
Set::gc::force_dispose();
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 1 );
+ EXPECT_EQ( i.nDisposeCount, 1u );
}
// clear
++it->nFindCount;
}
for ( auto it = s.cbegin(); it != s.cend(); ++it ) {
- EXPECT_EQ( it->nFindCount, 1 );
+ EXPECT_EQ( it->nFindCount, 1u );
}
for ( auto& i : data ) {
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
}
// clear test
s.clear();
ASSERT_TRUE( s.empty());
- ASSERT_CONTAINER_SIZE( s, 0 );
+ ASSERT_CONTAINER_SIZE( s, 0u );
ASSERT_TRUE( s.begin() == s.end() );
ASSERT_TRUE( s.cbegin() == s.cend() );
// Force retiring cycle
Set::gc::force_dispose();
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 1 );
+ EXPECT_EQ( i.nDisposeCount, 1u );
}
}
case 0:
ASSERT_TRUE( s.insert( i ));
ASSERT_FALSE( s.insert( i ));
- EXPECT_EQ( i.nUpdateCount, 0 );
+ EXPECT_EQ( i.nUpdateCount, 0u );
updResult = s.update( i, []( bool bNew, value_type& val, value_type& arg)
{
EXPECT_FALSE( bNew );
}, false );
EXPECT_TRUE( updResult.first );
EXPECT_FALSE( updResult.second );
- EXPECT_EQ( i.nUpdateCount, 1 );
+ EXPECT_EQ( i.nUpdateCount, 1u );
break;
case 1:
EXPECT_EQ( i.nUpdateNewCount, 0 );
});
EXPECT_TRUE( updResult.first );
EXPECT_TRUE( updResult.second );
- EXPECT_EQ( i.nUpdateNewCount, 1 );
+ EXPECT_EQ( i.nUpdateNewCount, 1u );
break;
}
ASSERT_TRUE( s.contains( i.nKey ) == &i );
ASSERT_TRUE( s.contains( i ) == &i );
ASSERT_TRUE( s.contains( other_item( i.key() ), other_less()) == &i );
- EXPECT_EQ( i.nFindCount, 0 );
+ EXPECT_EQ( i.nFindCount, 0u );
ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
- EXPECT_EQ( i.nFindCount, 2 );
+ EXPECT_EQ( i.nFindCount, 2u );
}
ASSERT_FALSE( s.empty() );
ASSERT_CONTAINER_SIZE( s, nSetSize );
++it->nFindCount;
}
for ( auto it = s.cbegin(); it != s.cend(); ++it ) {
- EXPECT_EQ( it->nFindCount, 1 );
+ EXPECT_EQ( it->nFindCount, 1u );
}
for ( auto& i : data ) {
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
}
// clear test
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 0 );
+ EXPECT_EQ( i.nDisposeCount, 0u );
}
s.clear();
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 1 );
+ EXPECT_EQ( i.nDisposeCount, 1u );
}
ASSERT_TRUE( s.empty());
- ASSERT_CONTAINER_SIZE( s, 0 );
+ ASSERT_CONTAINER_SIZE( s, 0u );
ASSERT_TRUE( s.begin() == s.end() );
ASSERT_TRUE( s.cbegin() == s.cend() );
}
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:
map_type m( kSize, 8 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelIterableMap_DHP, wrapped_stat )
map_type m( kSize, 8 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
} // namespace
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:
map_type m( kSize, 8 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelIterableMap_HP, wrapped_stat )
map_type m( kSize, 8 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
} // namespace
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:
map_type m( kSize, 2 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelLazyMap_DHP, wrapped_stat )
map_type m( kSize, 2 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
} // namespace
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:
map_type m( kSize, 2 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelLazyMap_HP, wrapped_stat )
map_type m( kSize, 2 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
} // namespace
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:
map_type m( kSize, 4 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelLazyMap_NoGC, wrapped_stat )
map_type m( kSize, 4 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
} // namespace
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:
map_type m( kSize, 8 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelMap_DHP, wrapped_stat )
map_type m( kSize, 8 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
} // namespace
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:
map_type m( kSize, 8 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelMap_HP, wrapped_stat )
map_type m( kSize, 8 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
} // namespace
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:
map_type m( kSize, 4 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelMap_NoGC, wrapped_stat )
map_type m( kSize, 4 );
test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
} // namespace
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:
ASSERT_TRUE( !gp );
}
EXPECT_TRUE( m.empty() );
- EXPECT_CONTAINER_SIZE( m, 0 );
+ EXPECT_CONTAINER_SIZE( m, 0u );
}
};
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:
map_type m( TestFixture::kSize, 4 );
this->test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( MichaelLazyMap, wrapped_stat )
map_type m( TestFixture::kSize, 4 );
this->test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
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:
map_type m( TestFixture::kSize, 4 );
this->test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( MichaelMap, wrapped_stat )
map_type m( TestFixture::kSize, 4 );
this->test( m );
- EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
}
REGISTER_TYPED_TEST_CASE_P( MichaelMap,
for ( size_t nByte = 0; nByte < sizeof(Integral); ++nByte ) {
integral_type n = integral_type(42) << (nByte * 8);
- EXPECT_EQ( a.exchange( n, order ), 0 );
+ EXPECT_EQ( a.exchange( n, order ), integral_type( 0 ));
EXPECT_EQ( a.load( oLoad ), n );
EXPECT_EQ( a.exchange( (integral_type) 0, order ), n );
- EXPECT_EQ( a.load( oLoad ), 0 );
+ EXPECT_EQ( a.load( oLoad ), integral_type( 0 ));
}
integral_type prev = a.load( oLoad );
// pop() doesn't call disposer
for ( size_t i = 0; i < nSize; ++i ) {
- ASSERT_EQ( arr[i].nDisposeCount, 0u );
+ ASSERT_EQ( arr[i].nDisposeCount, 0 );
}
// clear with disposer
ASSERT_EQ( q.size(), 0u );
for ( size_t i = 0; i < nSize; ++i ) {
- ASSERT_EQ( arr[i].nDisposeCount, 1u );
+ ASSERT_EQ( arr[i].nDisposeCount, 1 );
}
// clear without disposer
ASSERT_EQ( q.size(), 0u );
for ( size_t i = 0; i < nSize; ++i ) {
- ASSERT_EQ( arr[i].nDisposeCount, 1u );
+ ASSERT_EQ( arr[i].nDisposeCount, 1 );
}
}
};
void check_array( V& arr )
{
for ( size_t i = 0; i < arr.size(); ++i ) {
- EXPECT_EQ( arr[i].nDisposeCount, 2 );
- EXPECT_EQ( arr[i].nDispose2Count, 1 );
+ EXPECT_EQ( arr[i].nDisposeCount, 2u );
+ EXPECT_EQ( arr[i].nDispose2Count, 1u );
}
}
};
ASSERT_TRUE( q.pop_with( f ));
else
ASSERT_TRUE( q.dequeue_with( f ));
- ASSERT_EQ( it, i );
+ ASSERT_EQ( it, static_cast<value_type>( i ));
ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
}
ASSERT_TRUE( q.empty() );
ASSERT_FALSE( !gp );
}
EXPECT_EQ( gp->key(), i.key() );
- EXPECT_EQ( gp->nFindCount, i.key() * 3 );
+ EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
gp->nFindCount *= 2;
gp.release();
break;
}
EXPECT_EQ( gp->key(), i.key() );
- EXPECT_EQ( gp->nFindCount, i.key() * 6 );
+ EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 6 ));
switch ( idx % 3 ) {
case 0:
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_SET_TEST_SET_HP_H
}
for ( auto it = s.cbegin(); it != s.cend(); ++it ) {
- EXPECT_EQ( it->nFindCount, it->key() * 3 );
+ EXPECT_EQ( it->nFindCount, static_cast<size_t>( it->key() * 3 ));
}
typedef typename Set::guarded_ptr guarded_ptr;
ASSERT_FALSE( !gp );
}
EXPECT_EQ( gp->key(), i.key() );
- EXPECT_EQ( gp->nFindCount, i.key() * 3 );
+ EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
gp->nFindCount *= 2;
gp.release();
break;
}
EXPECT_EQ( gp->key(), i.key() );
- EXPECT_EQ( gp->nFindCount, i.key() * 6 );
+ EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 6 ));
switch ( idx % 3 ) {
case 0:
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.
*/
#include "test_intrusive_set.h"
ASSERT_TRUE( s.empty() );
ASSERT_CONTAINER_SIZE( s, 0 );
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 1 );
+ EXPECT_EQ( i.nDisposeCount, 1u );
}
}
ASSERT_TRUE( s.find( i.nKey, []( value_type const& v, int key )
{
EXPECT_EQ( v.key(), key );
- EXPECT_EQ( v.nFindCount, 1 );
+ EXPECT_EQ( v.nFindCount, 1u );
} ) );
break;
case 3:
ASSERT_TRUE( s.find( i.nKey, []( value_type const& v, int key )
{
EXPECT_EQ( v.key(), key );
- EXPECT_EQ( v.nFindCount, 1 );
+ EXPECT_EQ( v.nFindCount, 1u );
} ) );
break;
case 4:
} ));
ASSERT_TRUE( s.find( i, []( value_type& v, value_type const& )
{
- EXPECT_EQ( ++v.nFindCount, 2 );
+ EXPECT_EQ( ++v.nFindCount, 2u );
} ));
ASSERT_TRUE( (call_find_with< c_hasFindWith, Set >()(s, i.key(), []( value_type& v, other_item const& ) {
- EXPECT_EQ( ++v.nFindCount, 3 );
+ EXPECT_EQ( ++v.nFindCount, 3u );
})));
int nKey = i.key() - 1;
ASSERT_FALSE( (call_find_with<c_hasFindWith, Set>()( s, i.key(), []( value_type&, other_item const& ) {})));
}
ASSERT_TRUE( s.empty() );
- ASSERT_CONTAINER_SIZE( s, 0 );
+ ASSERT_CONTAINER_SIZE( s, 0u );
// clear
s.clear();
ASSERT_TRUE( s.empty() );
- ASSERT_CONTAINER_SIZE( s, 0 );
+ ASSERT_CONTAINER_SIZE( s, 0u );
}
};