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:
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:
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:
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:
typedef empty_stat stat;
/// Item counting feature; by default, disabled. Use \p cds::atomicity::item_counter to enable item counting
- typedef atomicity::empty_item_counter item_counter;
+ typedef atomicity::empty_item_counter item_counter;
/// C++ memory ordering model
/**
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:
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:
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:
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\unit\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
</Filter>\r
- <Filter Include="Resource Files">\r
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
- </Filter>\r
<Filter Include="Source Files\MichaelSet">\r
<UniqueIdentifier>{4c75be9d-6104-435d-b08f-09fa33b2bfcc}</UniqueIdentifier>\r
</Filter>\r
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
</Filter>\r
- <Filter Include="Resource Files">\r
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
- </Filter>\r
</ItemGroup>\r
<ItemGroup>\r
<ClCompile Include="..\..\..\test\unit\main.cpp">\r
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\stress\main.cpp">
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 CDSTEST_CHECK_SIZE_H
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:
operator()( bNew, val.first, val.second );
}
- // For FeldmanHashMap
+ // For FeldmanHashMap, IterableList
template <typename Val>
void operator()( Val& cur, Val * old )
{
testMap.erase( nItem );
EXPECT_TRUE( testMap.empty());
+ EXPECT_TRUE( testMap.size(), 0u );
additional_check( testMap );
print_stat( propout(), 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( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelLazySet_DHP, base_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelLazySet_DHP, member_cmp )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelLazySet_DHP, member_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelLazySet_HP, base_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelLazySet_HP, member_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelLazySet_NoGC, base_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelLazySet_NoGC, member_cmp )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelLazySet_NoGC, member_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_DHP, base_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_DHP, member_cmp )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_DHP, member_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_HP, base_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_HP, member_cmp )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_HP, member_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_NoGC, base_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_NoGC, member_cmp )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelSet_NoGC, member_wrapped_stat )
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
} // namespace
EXPECT_FALSE( updResult.second );
break;
case 1:
- EXPECT_EQ( i.nInsertCount, 0 );
+ EXPECT_EQ( i.nInsertCount, 0u );
ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nInsertCount;} ));
- EXPECT_EQ( i.nInsertCount, 1 );
+ EXPECT_EQ( i.nInsertCount, 1u );
ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nInsertCount;} ) );
- EXPECT_EQ( i.nInsertCount, 1 );
+ EXPECT_EQ( i.nInsertCount, 1u );
i.nInsertCount = 0;
break;
case 2:
ASSERT_TRUE( s.contains( i.nKey ) );
EXPECT_EQ( i.nFindCount, 0 );
ASSERT_TRUE( s.find( i.nKey, []( value_type& v ) { ++v.nFindCount; } ));
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
}
ASSERT_FALSE( s.empty() );
ASSERT_CONTAINER_SIZE( s, nSetSize );
ASSERT_TRUE( s.contains( i.nKey ) );
EXPECT_EQ( i.nFindCount, 0 );
ASSERT_TRUE( s.find( i.nKey, []( value_type& v ) { ++v.nFindCount; } ) );
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
value_type v( i );
switch ( i.key() % 3 ) {
ASSERT_FALSE( s.erase( i.key() ) );
break;
case 2:
- EXPECT_EQ( i.nEraseCount, 0 );
+ EXPECT_EQ( i.nEraseCount, 0u );
ASSERT_TRUE( s.erase( v.key(), []( value_type& val ) { ++val.nEraseCount; } ));
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
ASSERT_FALSE( s.erase( v.key(), []( value_type& val ) { ++val.nEraseCount; } ));
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
break;
}
// 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 );
}
// Reverse iterator test
++it->nFindCount;
}
for ( auto it = s.crbegin(); it != s.crend(); ++it ) {
- EXPECT_EQ( it->nFindCount, 2 );
+ EXPECT_EQ( it->nFindCount, 2u );
}
for ( auto& i : data ) {
- EXPECT_EQ( i.nFindCount, 2 );
+ EXPECT_EQ( i.nFindCount, 2u );
}
// 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 );
}
}
};
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:
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_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;
}
// 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 );
}
}
EXPECT_EQ( cds::bitop::MSBnz( n ), nBit - 1 ) << "n=" << n;
EXPECT_EQ( cds::bitop::LSBnz( n ), nBit - 1 ) << "n=" << n;
EXPECT_EQ( cds::bitop::SBC( n ), 1 ) << "n=" << n;
- EXPECT_EQ( cds::bitop::ZBC( n ), sizeof( n ) * 8 - 1 ) << "n=" << n;
+ EXPECT_EQ( cds::bitop::ZBC( n ), static_cast<int>( sizeof( n ) * 8 - 1 )) << "n=" << n;
++nBit;
}
TEST_F( bitop, ceil_pow2 )
{
- EXPECT_EQ( cds::beans::ceil2( 0 ), 1 );
- EXPECT_EQ( cds::beans::ceil2( 1 ), 1 );
- EXPECT_EQ( cds::beans::ceil2( 2 ), 2 );
- EXPECT_EQ( cds::beans::ceil2( 3 ), 4 );
- EXPECT_EQ( cds::beans::ceil2( 4 ), 4 );
- EXPECT_EQ( cds::beans::ceil2( 5 ), 8 );
- EXPECT_EQ( cds::beans::ceil2( 7 ), 8 );
- EXPECT_EQ( cds::beans::ceil2( 8 ), 8 );
- EXPECT_EQ( cds::beans::ceil2( 9 ), 16 );
+ EXPECT_EQ( cds::beans::ceil2( 0 ), 1u );
+ EXPECT_EQ( cds::beans::ceil2( 1 ), 1u );
+ EXPECT_EQ( cds::beans::ceil2( 2 ), 2u );
+ EXPECT_EQ( cds::beans::ceil2( 3 ), 4u );
+ EXPECT_EQ( cds::beans::ceil2( 4 ), 4u );
+ EXPECT_EQ( cds::beans::ceil2( 5 ), 8u );
+ EXPECT_EQ( cds::beans::ceil2( 7 ), 8u );
+ EXPECT_EQ( cds::beans::ceil2( 8 ), 8u );
+ EXPECT_EQ( cds::beans::ceil2( 9 ), 16u );
for ( uint32_t n = 4; n < (uint32_t(1) << 31); n <<= 1 )
{
EXPECT_EQ( (a &= (integral_type) ~mask ), ( prev & (integral_type) ~mask ));
prev = a;
- EXPECT_EQ( ( prev & mask), 0);
+ EXPECT_EQ( ( prev & mask), 0u);
EXPECT_EQ( (a ^= mask ), (prev ^ mask ));
prev = a;
EXPECT_TRUE( a.is_lock_free() );
a.store((integral_type) 0, oStore );
- EXPECT_EQ( a, 0 );
- EXPECT_EQ( a.load( oLoad ), 0 );
+ EXPECT_EQ( a, integral_type( 0 ));
+ EXPECT_EQ( a.load( oLoad ), integral_type( 0 ));
for ( size_t nByte = 0; nByte < sizeof(Integral); ++nByte ) {
integral_type n = integral_type(42) << (nByte * 8);
}
ASSERT_TRUE( !pq.empty() );
- ASSERT_EQ( pq.size(), 1 );
+ ASSERT_EQ( pq.size(), 1u );
ASSERT_TRUE( pq.pop( kv ) );
EXPECT_EQ( kv.k, PQueueTest::c_nMinValue );
ASSERT_TRUE( pq.empty() );
- ASSERT_EQ( pq.size(), 0 );
+ ASSERT_EQ( pq.size(), 0u );
// pop from empty pqueue
kv.k = PQueueTest::c_nCapacity * 2;
pq.clear();
ASSERT_TRUE( pq.empty() );
- ASSERT_EQ( pq.size(), 0 );
+ ASSERT_EQ( pq.size(), 0u );
}
};
} // namespace cds_test
for ( size_t i = 0; i < nSize; ++i ) {
it = -1;
ASSERT_TRUE( q.dequeue( it ));
- ASSERT_EQ( it, i );
+ ASSERT_EQ( it, static_cast<value_type>( i ));
ASSERT_EQ( q.size(), nSize - i - 1 );
}
ASSERT_TRUE( q.empty() );
for ( size_t i = 0; i < nSize; ++i ) {
it = -1;
ASSERT_TRUE( q.dequeue( it ) );
- ASSERT_EQ( it, i );
+ ASSERT_EQ( it, static_cast<value_type>( i ));
ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
}
ASSERT_TRUE( q.empty() );
ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
}
ASSERT_TRUE( q.empty() );
- ASSERT_CONTAINER_SIZE( q, 0 );
+ ASSERT_CONTAINER_SIZE( q, 0u );
for ( size_t i = 0; i < nSize; ++i ) {
ASSERT_TRUE( q.push( static_cast<value_type>(i) ) );
// clear
q.clear();
ASSERT_TRUE( q.empty() );
- ASSERT_CONTAINER_SIZE( q, 0 );
+ ASSERT_CONTAINER_SIZE( q, 0u );
// pop from empty queue
it = static_cast<int>(nSize * 2);
ASSERT_FALSE( q.pop( it ) );
ASSERT_EQ( it, nSize * 2 );
ASSERT_TRUE( q.empty() );
- ASSERT_CONTAINER_SIZE( q, 0 );
+ ASSERT_CONTAINER_SIZE( q, 0u );
ASSERT_FALSE( q.dequeue( it ) );
ASSERT_EQ( it, nSize * 2 );
ASSERT_TRUE( q.empty() );
- ASSERT_CONTAINER_SIZE( q, 0 );
+ ASSERT_CONTAINER_SIZE( q, 0u );
}
template <class Queue>
for ( size_t i = 0; i < nSize; ++i ) {
it = -1;
ASSERT_TRUE( q.pop( it ) );
- ASSERT_EQ( it, i );
+ ASSERT_EQ( it, static_cast<value_type>( i ));
ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
}
ASSERT_TRUE( q.empty() );
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( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelIterableSet_DHP, wrapped_stat )
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelIterableSet_HP, wrapped_stat )
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelLazySet_DHP, wrapped_stat )
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelLazySet_HP, wrapped_stat )
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelLazySet_NoGC, wrapped_stat )
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelSet_DHP, wrapped_stat )
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelSet_HP, wrapped_stat )
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( MichaelSet_NoGC, wrapped_stat )
set_type s( kSize, 4 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.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:
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:
}
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 ));
}
// reverse iterator set
}
for ( auto it = s.crbegin(); it != s.crend(); ++it ) {
- EXPECT_EQ( it->nFindCount, it->key() * 2 );
+ EXPECT_EQ( it->nFindCount, static_cast<size_t>( it->key() * 2 ));
}
typedef typename Set::guarded_ptr guarded_ptr;
gp = s.get( i.key());
ASSERT_FALSE( !gp );
EXPECT_EQ( gp->key(), i.key() );
- EXPECT_EQ( gp->nFindCount, i.key() * 2 );
+ EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 2 ));
gp->nFindCount *= 2;
gp.release();
gp = s.extract( i.key() );
ASSERT_FALSE( !gp );
EXPECT_EQ( gp->key(), i.key() );
- EXPECT_EQ( gp->nFindCount, i.key() * 4 );
+ EXPECT_EQ( gp->nFindCount, static_cast<>size_t( i.key() * 4 ));
gp = s.extract( i.key() );
ASSERT_TRUE( !gp );
value_type * p = s.get( i.key());
ASSERT_TRUE( p != nullptr );
EXPECT_EQ( p->key(), i.key() );
- EXPECT_EQ( p->nFindCount, i.key() * 2 );
+ EXPECT_EQ( p->nFindCount, static_cast<size_t>( i.key() * 2 ));
p->nFindCount *= 2;
}
}
xp = s.extract( i.key() );
ASSERT_FALSE( !xp );
EXPECT_EQ( xp->key(), i.key() );
- EXPECT_EQ( xp->nFindCount, i.key() * 4 );
+ EXPECT_EQ( xp->nFindCount, static_cast<size_t>( i.key() * 4 ));
xp = s.extract( i.key() );
ASSERT_TRUE( !xp );
ASSERT_FALSE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} ));
}
ASSERT_TRUE( s.empty() );
- ASSERT_CONTAINER_SIZE( s, 0 );
+ ASSERT_CONTAINER_SIZE( s, 0u );
// clear
for ( auto& i : data ) {
s.clear();
ASSERT_TRUE( s.empty() );
- ASSERT_CONTAINER_SIZE( s, 0 );
+ ASSERT_CONTAINER_SIZE( s, 0u );
// clear_and_dispose
for ( auto& i : data ) {
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.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:
}));
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_predicate(), []( 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_predicate(), []( 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 );
}
};