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 "map_type.h"
nMissingSuccess += w.m_KeyNotExists.nSuccess;
nMissingFailed += w.m_KeyNotExists.nFailed;
- EXPECT_EQ( w.m_KeyExists.nFailed, 0 ) << "thread " << i;
+ EXPECT_EQ( w.m_KeyExists.nFailed, 0u ) << "thread " << i;
EXPECT_EQ( w.m_KeyExists.nSuccess, s_nRealMapSize * s_nPassCount ) << "thread " << i;
- EXPECT_EQ( w.m_KeyNotExists.nFailed, 0 ) << "thread " << i;
+ EXPECT_EQ( w.m_KeyNotExists.nFailed, 0u ) << "thread " << i;
EXPECT_EQ( w.m_KeyNotExists.nSuccess, (s_Data.size() - s_nRealMapSize) * s_nPassCount ) << "thread " << i;
}
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:
nMissingFailed += w.m_KeyNotExists.nFailed;
EXPECT_EQ( w.m_KeyExists.nSuccess, s_nMapSize * s_nPassCount ) << "thread " << i;
- EXPECT_EQ( w.m_KeyExists.nFailed, 0 ) << "thread " << i;
+ EXPECT_EQ( w.m_KeyExists.nFailed, 0u ) << "thread " << i;
EXPECT_EQ( w.m_KeyNotExists.nSuccess, (s_Data.size() - s_nMapSize) * s_nPassCount ) << "thread " << i;
- EXPECT_EQ( w.m_KeyNotExists.nFailed, 0 ) << "thread " << i;
+ EXPECT_EQ( w.m_KeyNotExists.nFailed, 0u ) << "thread " << i;
}
propout()
template <class Map>
void run_test()
{
- ASSERT_GT( s_Data.size(), 0 );
+ ASSERT_GT( s_Data.size(), 0u );
Map testMap( *this );
test( testMap );
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:
set_type s( TestFixture::kSize, 2 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( IntrusiveMichaelLazySet, base_wrapped_stat )
set_type s( TestFixture::kSize, 2 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( IntrusiveMichaelLazySet, member_cmp )
set_type s( TestFixture::kSize, 2 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( IntrusiveMichaelLazySet, member_wrapped_stat )
set_type s( TestFixture::kSize, 2 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
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:
set_type s( TestFixture::kSize, 2 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( IntrusiveMichaelSet, base_wrapped_stat )
set_type s( TestFixture::kSize, 2 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( IntrusiveMichaelSet, member_cmp )
set_type s( TestFixture::kSize, 2 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( IntrusiveMichaelSet, member_wrapped_stat )
set_type s( TestFixture::kSize, 2 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
EXPECT_EQ( i.nUpdateCount, 1u );
break;
case 1:
- EXPECT_EQ( i.nUpdateNewCount, 0 );
+ EXPECT_EQ( i.nUpdateNewCount, 0u );
updResult = s.update( i, []( bool bNew, value_type& val, value_type& arg )
{
EXPECT_TRUE( bNew );
// pop from empty queue
it = static_cast<int>(nSize * 2);
ASSERT_FALSE( q.pop( it ) );
- ASSERT_EQ( it, nSize * 2 );
+ ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
ASSERT_TRUE( q.empty() );
ASSERT_CONTAINER_SIZE( q, 0u );
ASSERT_FALSE( q.dequeue( it ) );
- ASSERT_EQ( it, nSize * 2 );
+ ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
ASSERT_TRUE( q.empty() );
ASSERT_CONTAINER_SIZE( q, 0u );
}
EXPECT_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:
EXPECT_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_FALSE( old == nullptr );
EXPECT_EQ( v.key(), old->key() );
- EXPECT_EQ( old->nUpdateNewCount, 1 );
+ EXPECT_EQ( old->nUpdateNewCount, 1u );
v.nUpdateNewCount = old->nUpdateNewCount;
++v.nUpdateCount;
}, false );
EXPECT_TRUE( s.find( i.nKey, []( value_type const& v, int key )
{
EXPECT_EQ( v.key(), key );
- EXPECT_EQ( v.nUpdateNewCount, 1 );
- EXPECT_EQ( v.nUpdateCount, 1 );
+ EXPECT_EQ( v.nUpdateNewCount, 1u );
+ EXPECT_EQ( v.nUpdateCount, 1u );
}));
break;
case 5:
{
EXPECT_FALSE( old == nullptr );
EXPECT_EQ( v.key(), old->key() );
- EXPECT_EQ( old->nUpdateNewCount, 1 );
+ EXPECT_EQ( old->nUpdateNewCount, 1u );
v.nUpdateNewCount = old->nUpdateNewCount;
++v.nUpdateCount;
}, false );
EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
{
EXPECT_EQ( v.key(), arg.key() );
- EXPECT_EQ( v.nUpdateNewCount, 1 );
- EXPECT_EQ( v.nUpdateCount, 1 );
+ EXPECT_EQ( v.nUpdateNewCount, 1u );
+ EXPECT_EQ( v.nUpdateCount, 1u );
}));
break;
case 6:
}));
EXPECT_TRUE( s.find( i, []( value_type& v, value_type const& )
{
- EXPECT_EQ( ++v.nFindCount, 2 );
+ EXPECT_EQ( ++v.nFindCount, 2u );
}));
EXPECT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& )
{
- EXPECT_EQ( ++v.nFindCount, 3 );
+ EXPECT_EQ( ++v.nFindCount, 3u );
}));
int nKey = i.key() - 1;
EXPECT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
}
EXPECT_TRUE( s.empty() );
- EXPECT_CONTAINER_SIZE( s, 0 );
+ EXPECT_CONTAINER_SIZE( s, 0u );
// clear
s.clear();
EXPECT_TRUE( s.empty() );
- EXPECT_CONTAINER_SIZE( s, 0 );
+ EXPECT_CONTAINER_SIZE( s, 0u );
EXPECT_TRUE( s.begin() == s.end() );
EXPECT_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:
set_type s( TestFixture::kSize, 4 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( MichaelLazySet, wrapped_stat )
set_type s( TestFixture::kSize, 4 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
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:
set_type s( TestFixture::kSize, 4 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TYPED_TEST_P( MichaelSet, wrapped_stat )
set_type s( TestFixture::kSize, 4 );
this->test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
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( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& )
{
- EXPECT_EQ( ++v.nFindCount, 3 );
+ EXPECT_EQ( ++v.nFindCount, 3u );
}));
int nKey = i.key() - 1;
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 );
// clear
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() );
ASSERT_TRUE( s.find( i.nKey, []( value_type const& v, int key )
{
EXPECT_EQ( v.key(), key );
- EXPECT_EQ( v.nUpdateNewCount, 2 );
+ EXPECT_EQ( v.nUpdateNewCount, 2u );
} ) );
break;
case 5:
ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
{
EXPECT_EQ( v.key(), arg.key() );
- EXPECT_EQ( v.nUpdateNewCount, 2 );
+ EXPECT_EQ( v.nUpdateNewCount, 2u );
} ) );
break;
case 6: