if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcx16")
endif()
- if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
-# gcc 4.8: disable noise -Wunused-local-typedefs -Wno-unused-parameter
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0.0")
+# gcc 4.8 - 6: disable noise -Wunused-local-typedefs
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
endif()
endif()
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:
template <typename Q, typename Less>
guarded_ptr get_with_( Q const& val, Less pred ) const
{
+ CDS_UNUSED( pred );
+
typedef ellen_bintree::details::compare<
key_type,
value_type,
<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\MichaelMap">\r
<UniqueIdentifier>{12baf500-5c1c-44a7-9bac-e0554eb93b1a}</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\pqueue\fcpqueue_vector.cpp">\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
static uint32 Hash32Len0to4(const char *s, size_t len) {
uint32 b = 0;
uint32 c = 9;
- for (int i = 0; i < len; i++) {
+ for (size_t i = 0; i < len; i++) {
signed char v = s[i];
b = b * c1 + v;
c ^= b;
}
EXPECT_EQ( nInsertSuccess, s_nMapSize * s_nInsThreadCount );
- EXPECT_EQ( nInsertFailed, 0 );
+ EXPECT_EQ( nInsertFailed, 0u );
propout()
<< std::make_pair( "insert_success", nInsertSuccess )
}
EXPECT_EQ( nInsertSuccess, s_nMapSize * s_nInsThreadCount );
- EXPECT_EQ( nInsertFailed, 0 );
+ EXPECT_EQ( nInsertFailed, 0u );
propout()
<< std::make_pair( "insert_success", nInsertSuccess )
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_insdel_string.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:
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 "intrusive_stack_type.h"
protected:
template <class Stack>
- void analyze( Stack& stack )
+ void analyze( Stack& /*stack*/ )
{
cds_test::thread_pool& pool = get_pool();
}
template< class Stack>
- void analyze( Stack& stack )
+ void analyze( Stack& /*stack*/ )
{
cds_test::thread_pool& pool = get_pool();
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_feldman_hashset_hp.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:
set_type s( kSize, 2 );
test( s );
- EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+ EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
}
TEST_F( IntrusiveMichaelIterableSet_DHP, 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( IntrusiveMichaelIterableSet_HP, 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:
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_INTRUSIVE_FELDMAN_HASHSET_H
{
std::vector< typename Set::level_statistics > level_stat;
s.get_level_statistics( level_stat );
- EXPECT_GT( level_stat.size(), 0 );
+ EXPECT_GT( level_stat.size(), 0u );
}
// erase
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_INTRUSIVE_FELDMAN_HASHSET_HP_H
for ( auto idx : indices ) {
auto& i = data[idx];
- EXPECT_EQ( i.nFindCount, 0 );
+ EXPECT_EQ( i.nFindCount, 0u );
gp = s.get( i.key() );
ASSERT_FALSE( !gp );
++gp->nFindCount;
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
gp = s.extract( i.key());
ASSERT_FALSE( !gp );
++gp->nEraseCount;
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
gp = s.extract( i.key() );
ASSERT_TRUE( !gp );
// Force retiring cycle
Set::gc::force_dispose();
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 1 );
+ EXPECT_EQ( i.nDisposeCount, 1u );
}
// erase_at( iterator )
// Force retiring cycle
Set::gc::force_dispose();
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 1 );
+ EXPECT_EQ( i.nDisposeCount, 1u );
}
// erase_at( reverse_iterator )
// 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:
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_INTRUSIVE_FELDMAN_HASHSET_RCU_H
{
rcu_lock l;
- EXPECT_EQ( i.nFindCount, 0 );
+ EXPECT_EQ( i.nFindCount, 0u );
rp = s.get( i.key() );
ASSERT_FALSE( !rp );
++rp->nFindCount;
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
}
- EXPECT_EQ( i.nEraseCount, 0 );
+ EXPECT_EQ( i.nEraseCount, 0u );
xp = s.extract( i.key());
ASSERT_FALSE( !xp );
++xp->nEraseCount;
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
xp = s.extract( i.key() );
ASSERT_TRUE( !xp );
// Force retiring cycle
Set::gc::force_dispose();
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 1 );
+ EXPECT_EQ( i.nDisposeCount, 1u );
}
}
for ( auto idx : indices ) {
auto& i = data[idx];
- EXPECT_EQ( i.nFindCount, 0 );
+ EXPECT_EQ( i.nFindCount, 0u );
gp = s.get( i );
ASSERT_FALSE( !gp );
++gp->nFindCount;
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
gp = s.get( i.key() );
ASSERT_FALSE( !gp );
++gp->nFindCount;
- EXPECT_EQ( i.nFindCount, 2 );
+ EXPECT_EQ( i.nFindCount, 2u );
gp = s.get_with( other_item( i.key()), other_less());
ASSERT_FALSE( !gp );
++gp->nFindCount;
- EXPECT_EQ( i.nFindCount, 3 );
+ EXPECT_EQ( i.nFindCount, 3u );
- EXPECT_EQ( i.nEraseCount, 0 );
+ EXPECT_EQ( i.nEraseCount, 0u );
switch ( i.key() % 3 ) {
case 0:
gp = s.extract( i.key());
}
ASSERT_FALSE( !gp );
++gp->nEraseCount;
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
gp = s.extract( i );
ASSERT_TRUE( !gp );
// 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:
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_INTRUSIVE_SET_H
std::pair<bool, bool> updResult;
- updResult = s.update( i, []( bool bNew, value_type&, value_type& )
+ updResult = s.update( i, []( bool, value_type&, value_type& )
{
ASSERT_TRUE( false );
}, false );
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 );
value_type v( i );
switch ( i.key() % 6 ) {
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_INTRUSIVE_SET_NOGC_H
std::pair<bool, bool> updResult;
- updResult = s.update( i, []( bool bNew, value_type&, value_type& )
+ updResult = s.update( i, []( bool, value_type&, value_type& )
{
ASSERT_TRUE( false );
}, false );
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_INTRUSIVE_SET_RCU_H
{
rcu_lock l;
- EXPECT_EQ( i.nFindCount, 0 );
+ EXPECT_EQ( i.nFindCount, 0u );
rp = s.get( i );
ASSERT_FALSE( !rp );
++rp->nFindCount;
- EXPECT_EQ( i.nFindCount, 1 );
+ EXPECT_EQ( i.nFindCount, 1u );
rp = s.get( i.key() );
ASSERT_FALSE( !rp );
++rp->nFindCount;
- EXPECT_EQ( i.nFindCount, 2 );
+ EXPECT_EQ( i.nFindCount, 2u );
rp = s.get_with( other_item( i.key()), other_less());
ASSERT_FALSE( !rp );
++rp->nFindCount;
- EXPECT_EQ( i.nFindCount, 3 );
+ EXPECT_EQ( i.nFindCount, 3u );
}
if ( Set::c_bExtractLockExternal ) {
{
rcu_lock l;
- EXPECT_EQ( i.nEraseCount, 0 );
+ EXPECT_EQ( i.nEraseCount, 0u );
switch ( i.key() % 3 ) {
case 0:
xp = s.extract( i.key());
ASSERT_FALSE( !xp );
++xp->nEraseCount;
}
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
xp.release();
{
}
}
else {
- EXPECT_EQ( i.nEraseCount, 0 );
+ EXPECT_EQ( i.nEraseCount, 0u );
switch ( i.key() % 3 ) {
case 0:
xp = s.extract( i.key());
}
ASSERT_FALSE( !xp );
++xp->nEraseCount;
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
xp = s.extract( i );
ASSERT_TRUE( !xp );
// 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:
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:
case 4:
{
- auto pair = l.update( i.key, []( list_value_type& n, list_value_type* old ) {
+ auto pair = l.update( i.key, []( list_value_type&, list_value_type* ) {
ASSERT_TRUE( false );
}, false );
EXPECT_FALSE( pair.first );
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_LIST_TEST_KV_LIST_H
break;
case 4:
{
- auto pair = l.update( i.key, []( bool bNew, list_value_type& n ) {
+ auto pair = l.update( i.key, []( bool, list_value_type& ) {
ASSERT_TRUE( false );
}, false );
EXPECT_FALSE( pair.first );
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_feldman_hashmap_hp.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:
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_feldman_hashmap_hp.h"
> map_type;
map_type m( 4, 5 );
- EXPECT_GE( m.head_size(), 1 << 4 );
- EXPECT_EQ( m.array_node_size(), 1 << 5 );
+ EXPECT_GE( m.head_size(), static_cast<size_t>( 1 << 4 ));
+ EXPECT_EQ( m.array_node_size(), static_cast<size_t>( 1 << 5 ));
test( m );
}
> map_type;
map_type m( 3, 2 );
- EXPECT_GE( m.head_size(), 1 << 4 ); // min = 2 ** 4
- EXPECT_EQ( m.array_node_size(), 1 << 2 );
+ EXPECT_GE( m.head_size(), static_cast<size_t>( 1 << 4 )); // min = 2 ** 4
+ EXPECT_EQ( m.array_node_size(), static_cast<size_t>( 1 << 2 ));
test( m );
}
> map_type;
map_type m( 4, 4 );
- EXPECT_EQ( m.head_size(), 1 << 4 );
- EXPECT_EQ( m.array_node_size(), 1 << 4 );
+ EXPECT_EQ( m.head_size(), static_cast<size_t>( 1 << 4 ));
+ EXPECT_EQ( m.array_node_size(), static_cast<size_t>( 1 << 4 ));
test( m );
}
typedef cc::FeldmanHashMap< gc_type, key_type, value_type, map_traits > map_type;
map_type m( 8, 2 );
- EXPECT_EQ( m.head_size(), 1 << 8 );
- EXPECT_EQ( m.array_node_size(), 1 << 2 );
+ EXPECT_EQ( m.head_size(), static_cast<size_t>( 1 << 8 ));
+ EXPECT_EQ( m.array_node_size(), static_cast<size_t>( 1 << 2 ));
test( m );
}
typedef cc::FeldmanHashMap< gc_type, key_type, value_type, map_traits > map_type;
map_type m( 1, 1 );
- EXPECT_EQ( m.head_size(), 1 << 4 ); // min = 2**4
- EXPECT_EQ( m.array_node_size(), 1 << 2 ); // min = 2**2
+ EXPECT_EQ( m.head_size(), static_cast<size_t>( 1 << 4 )); // min = 2**4
+ EXPECT_EQ( m.array_node_size(), static_cast<size_t>( 1 << 2 )); // min = 2**2
test( m );
}
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_MAP_TEST_FELDMAN_HASHMAP_H
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;
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_MAP_TEST_FELDMAN_HASHMAP_HP_H
ASSERT_TRUE( m.empty());
ASSERT_CONTAINER_SIZE( m, 0 );
- typedef typename Map::value_type map_pair;
+ //typedef typename Map::value_type map_pair;
size_t const kkSize = base_class::kSize;
std::vector<key_type> arrKeys;
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:
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_MAP_TEST_MAP_NOGC_H
v.second.strVal = std::to_string( v.first.nKey );
} );
ASSERT_FALSE( it == m.end() );
- ASSERT_TRUE( m.insert_with( i, []( map_pair& v ) {
+ ASSERT_TRUE( m.insert_with( i, []( map_pair& ) {
EXPECT_TRUE( false );
} ) == m.end());
break;
v.second.strVal = std::to_string( v.first.nKey );
} );
ASSERT_FALSE( it == m.end() );
- ASSERT_TRUE( m.insert_with( i.nKey, []( map_pair& v ) {
+ ASSERT_TRUE( m.insert_with( i.nKey, []( map_pair& ) {
EXPECT_TRUE( false );
} ) == m.end());
break;
v.second.strVal = std::to_string( v.first.nKey );
} );
ASSERT_FALSE( it == m.end() );
- ASSERT_TRUE( m.insert_with( val.strVal, []( map_pair& v ) {
+ ASSERT_TRUE( m.insert_with( val.strVal, []( map_pair& ) {
EXPECT_TRUE( false );
} ) == m.end());
break;
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:
v.second.nVal = v.first.nKey;
v.second.strVal = std::to_string( v.first.nKey );
} ));
- EXPECT_FALSE( m.insert_with( i, []( map_pair& v ) {
+ EXPECT_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 );
} ));
- EXPECT_FALSE( m.insert_with( i.nKey, []( map_pair& v ) {
+ EXPECT_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 );
} ));
- EXPECT_FALSE( m.insert_with( val.strVal, []( map_pair& v ) {
+ EXPECT_FALSE( m.insert_with( val.strVal, []( map_pair& ) {
EXPECT_TRUE( false );
} ));
break;
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_EQ( cds::bitop::MSB(n), 0 ) << "n=" << n;
EXPECT_EQ( cds::bitop::LSB( n ), 0 ) << "n=" << n;
EXPECT_EQ( cds::bitop::SBC( n ), 0 ) << "n=" << n;
- EXPECT_EQ( cds::bitop::ZBC( n ), sizeof( n ) * 8 ) << "n=" << n;
+ EXPECT_EQ( cds::bitop::ZBC( n ), static_cast<int>( sizeof( n ) * 8 )) << "n=" << n;
int nBit = 1;
for ( n = 1; n != 0; n *= 2 ) {
TEST_F( bitop, floor_pow2 )
{
- EXPECT_EQ( cds::beans::floor2( 0 ), 1 );
- EXPECT_EQ( cds::beans::floor2( 1 ), 1 );
- EXPECT_EQ( cds::beans::floor2( 2 ), 2 );
- EXPECT_EQ( cds::beans::floor2( 3 ), 2 );
- EXPECT_EQ( cds::beans::floor2( 4 ), 4 );
- EXPECT_EQ( cds::beans::floor2( 5 ), 4 );
- EXPECT_EQ( cds::beans::floor2( 7 ), 4 );
- EXPECT_EQ( cds::beans::floor2( 8 ), 8 );
- EXPECT_EQ( cds::beans::floor2( 9 ), 8 );
+ EXPECT_EQ( cds::beans::floor2( 0 ), 1u );
+ EXPECT_EQ( cds::beans::floor2( 1 ), 1u );
+ EXPECT_EQ( cds::beans::floor2( 2 ), 2u );
+ EXPECT_EQ( cds::beans::floor2( 3 ), 2u );
+ EXPECT_EQ( cds::beans::floor2( 4 ), 4u );
+ EXPECT_EQ( cds::beans::floor2( 5 ), 4u );
+ EXPECT_EQ( cds::beans::floor2( 7 ), 4u );
+ EXPECT_EQ( cds::beans::floor2( 8 ), 8u );
+ EXPECT_EQ( cds::beans::floor2( 9 ), 8u );
for ( uint32_t n = 2; n; n <<= 1 )
{
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 <gtest/gtest.h>
EXPECT_TRUE( a.is_lock_free() );
a.store( (integral_type) 0 );
- EXPECT_EQ( a, 0 );
- EXPECT_EQ( a.load(), 0 );
+ EXPECT_EQ( a, static_cast<integral_type>( 0 ));
+ EXPECT_EQ( a.load(), static_cast<integral_type>( 0 ));
for ( size_t nByte = 0; nByte < sizeof(Integral); ++nByte ) {
integral_type n = integral_type(42) << (nByte * 8);
- EXPECT_EQ( a.exchange( n ), 0 );
+ EXPECT_EQ( a.exchange( n ), static_cast<integral_type>( 0 ));
EXPECT_EQ( a, n );
EXPECT_EQ( a.exchange( (integral_type) 0 ), n );
- EXPECT_EQ( a.load(), 0 );
+ EXPECT_EQ( a.load(), static_cast<integral_type>( 0 ));
}
integral_type prev = a.load();
EXPECT_EQ( a.fetch_sub(n), prev);
}
- EXPECT_EQ( a.load(), 0 );
+ EXPECT_EQ( a.load(), static_cast<integral_type>( 0 ));
// fetch_or / fetc_xor / fetch_and
for ( size_t nBit = 0; nBit < sizeof(integral_type) * 8; ++nBit )
EXPECT_EQ( (a -= n), prev - n );
}
- EXPECT_EQ( a.load(), 0 );
+ EXPECT_EQ( a.load(), (integral_type) 0 );
// |= / ^= / &=
for ( size_t nBit = 0; nBit < sizeof(integral_type) * 8; ++nBit )
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 <gtest/gtest.h>
for ( size_t nByte = 0; nByte < sizeof(Integral); ++nByte ) {
integral_type n = integral_type(42) << (nByte * 8);
- EXPECT_EQ( atomics::atomic_exchange( &a, n ), 0 );
+ EXPECT_EQ( atomics::atomic_exchange( &a, n ), (integral_type) 0 );
EXPECT_EQ( atomics::atomic_load( &a ), n );
EXPECT_EQ( atomics::atomic_exchange( &a, (integral_type) 0 ), n );
- EXPECT_EQ( atomics::atomic_load( &a ), 0 );
+ EXPECT_EQ( atomics::atomic_load( &a ), (integral_type) 0 );
}
integral_type prev = atomics::atomic_load( &a );
EXPECT_EQ( atomics::atomic_fetch_sub( &a, n ), prev );
}
- EXPECT_EQ( atomics::atomic_load( &a ), 0 );
+ EXPECT_EQ( atomics::atomic_load( &a ), (integral_type) 0 );
// fetch_or / fetc_xor / fetch_and
for ( size_t nBit = 0; nBit < sizeof(integral_type) * 8; ++nBit )
EXPECT_TRUE( atomics::atomic_is_lock_free( &a ) );
atomics::atomic_store_explicit( &a, (integral_type) 0, oStore );
EXPECT_EQ( a, 0 );
- EXPECT_EQ( atomics::atomic_load_explicit( &a, oLoad ), 0 );
+ EXPECT_EQ( atomics::atomic_load_explicit( &a, oLoad ), (integral_type) 0 );
for ( size_t nByte = 0; nByte < sizeof(Integral); ++nByte ) {
integral_type n = integral_type(42) << (nByte * 8);
- EXPECT_EQ( atomics::atomic_exchange_explicit( &a, n, order ), 0 );
+ EXPECT_EQ( atomics::atomic_exchange_explicit( &a, n, order ), (integral_type) 0 );
EXPECT_EQ( atomics::atomic_load_explicit( &a, oLoad ), n );
EXPECT_EQ( atomics::atomic_exchange_explicit( &a, (integral_type) 0, order ), n );
- EXPECT_EQ( atomics::atomic_load_explicit( &a, oLoad ), 0 );
+ EXPECT_EQ( atomics::atomic_load_explicit( &a, oLoad ), (integral_type) 0 );
}
integral_type prev = atomics::atomic_load_explicit( &a, oLoad );
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 <cds/opt/permutation.h>
} while ( gen.next() );
for ( size_t i = 0; i < nLen; ++i )
- EXPECT_EQ( arr[i], 1 ) << "i=" << i;
+ EXPECT_EQ( arr[i], 1u ) << "i=" << i;
for ( size_t i = nLen; i < c_nMax; ++i )
- EXPECT_EQ( arr[i], 0 ) << "i=" << i;
+ EXPECT_EQ( arr[i], 0u ) << "i=" << i;
gen.reset();
}
value_type * pLast = pFirst + pq.capacity();
ASSERT_TRUE( pq.empty() );
- ASSERT_EQ( pq.size(), 0 );
- ASSERT_EQ( pq.capacity(), base_class::c_nCapacity - 1 );
+ ASSERT_EQ( pq.size(), 0u );
+ ASSERT_EQ( pq.capacity(), size_t( base_class::c_nCapacity - 1 ));
size_t nSize = 0;
ASSERT_TRUE( !pq.full() );
ASSERT_TRUE( !pq.empty() );
- ASSERT_EQ( pq.size(), 1 );
+ ASSERT_EQ( pq.size(), 1u );
ASSERT_TRUE( pq.pop( kv ) );
EXPECT_EQ( kv.k, base_class::c_nMinValue );
ASSERT_TRUE( !pq.full() );
ASSERT_TRUE( pq.empty() );
- ASSERT_EQ( pq.size(), 0 );
+ ASSERT_EQ( pq.size(), 0u );
// Clear test
for ( value_type * p = pFirst; p < pLast; ++p ) {
pq.clear();
ASSERT_TRUE( pq.empty() );
ASSERT_TRUE( !pq.full() );
- ASSERT_EQ( pq.size(), 0 );
+ ASSERT_EQ( pq.size(), 0u );
// clear_with test
for ( value_type * p = pFirst; p < pLast; ++p ) {
pq.clear_with( std::ref( disp ) );
ASSERT_TRUE( pq.empty() );
ASSERT_TRUE( !pq.full() );
- ASSERT_EQ( pq.size(), 0 );
+ ASSERT_EQ( pq.size(), 0u );
ASSERT_EQ( disp.m_nCallCount, pq.capacity() );
}
}
ASSERT_EQ( pq.size(), ++nSize );
}
- ASSERT_EQ( pq.size(), PQueueTest::c_nCapacity );
+ ASSERT_EQ( pq.size(), static_cast<size_t>(PQueueTest::c_nCapacity ));
// Pop test
key_type nPrev = PQueueTest::c_nMinValue + key_type( PQueueTest::c_nCapacity ) - 1;
ASSERT_TRUE( pq.pop( kv ) );
EXPECT_EQ( kv.k, nPrev );
- ASSERT_EQ( pq.size(), PQueueTest::c_nCapacity - 1 );
+ ASSERT_EQ( pq.size(), static_cast<size_t>( PQueueTest::c_nCapacity - 1 ));
ASSERT_TRUE( !pq.empty() );
nSize = pq.size();
ASSERT_TRUE( pq.push( *p ) );
ASSERT_TRUE( !pq.empty() );
- ASSERT_EQ( pq.size(), PQueueTest::c_nCapacity );
+ ASSERT_EQ( pq.size(), static_cast<size_t>( PQueueTest::c_nCapacity ));
pq.clear();
ASSERT_TRUE( pq.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:
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 <gtest/gtest.h>
const size_t nSize = 100;
ASSERT_TRUE( q.empty() );
- ASSERT_EQ( q.size(), 0 );
+ ASSERT_EQ( q.size(), 0u );
// enqueue/dequeue
for ( size_t i = 0; i < nSize; ++i ) {
ASSERT_EQ( q.size(), nSize - i - 1 );
}
ASSERT_TRUE( q.empty() );
- ASSERT_EQ( q.size(), 0 );
+ ASSERT_EQ( q.size(), 0u );
// push/pop
for ( size_t i = 0; i < nSize; ++i ) {
ASSERT_EQ( q.size(), nSize - i - 1 );
}
ASSERT_TRUE( q.empty() );
- ASSERT_EQ( q.size(), 0 );
+ ASSERT_EQ( q.size(), 0u );
// clear
for ( size_t i = 0; i < nSize; ++i ) {
q.clear();
ASSERT_TRUE( q.empty() );
- ASSERT_EQ( q.size(), 0 );
+ ASSERT_EQ( q.size(), 0u );
// pop from empty queue
it = nSize * 2;
ASSERT_FALSE( q.pop( it ));
ASSERT_EQ( it, nSize * 2 );
ASSERT_TRUE( q.empty() );
- ASSERT_EQ( q.size(), 0 );
+ ASSERT_EQ( q.size(), 0u );
ASSERT_FALSE( q.dequeue( it ) );
ASSERT_EQ( it, nSize * 2 );
ASSERT_TRUE( q.empty() );
- ASSERT_EQ( q.size(), 0 );
+ ASSERT_EQ( q.size(), 0u );
}
template <class Queue>
ASSERT_EQ( s, str[i] );
}
ASSERT_TRUE( q.empty() );
- ASSERT_EQ( q.size(), 0 );
+ ASSERT_EQ( q.size(), 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:
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_QUEUE_TEST_GENERIC_QUEUE_H
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() );
// pop from empty queue
it = 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, 0 );
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, 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_FELDMAN_HASHSET_RCU_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 ));
}
for ( auto it = s.rbegin(); it != s.rend(); ++it ) {
}
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 ));
}
}
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_H
std::pair<bool, bool> updResult;
std::string str;
- updResult = s.update( i.key(), []( bool bNew, value_type&, int )
+ updResult = s.update( i.key(), []( bool, value_type&, int )
{
ASSERT_TRUE( false );
}, false );
value_type v;
ASSERT_TRUE( stack.empty() );
- ASSERT_EQ( stack.size(), 0 );
+ ASSERT_EQ( stack.size(), 0u );
ASSERT_TRUE( stack.push( 1 ) );
ASSERT_TRUE( !stack.empty() );
- ASSERT_EQ( stack.size(), 1 );
+ ASSERT_EQ( stack.size(), 1u );
ASSERT_TRUE( stack.push( 2 ) );
ASSERT_TRUE( !stack.empty() );
- ASSERT_EQ( stack.size(), 2 );
+ ASSERT_EQ( stack.size(), 2u );
ASSERT_TRUE( stack.push( 3 ) );
ASSERT_TRUE( !stack.empty() );
- ASSERT_EQ( stack.size(), 3 );
+ ASSERT_EQ( stack.size(), 3u );
ASSERT_TRUE( stack.pop( v ) );
EXPECT_EQ( v, 3 );
ASSERT_TRUE( !stack.empty() );
- ASSERT_EQ( stack.size(), 2 );
+ ASSERT_EQ( stack.size(), 2u );
ASSERT_TRUE( stack.pop( v ) );
EXPECT_EQ( v, 2 );
ASSERT_TRUE( !stack.empty() );
- ASSERT_EQ( stack.size(), 1 );
+ ASSERT_EQ( stack.size(), 1u );
ASSERT_TRUE( stack.pop( v ) );
EXPECT_EQ( v, 1 );
ASSERT_TRUE( stack.empty() );
- ASSERT_EQ( stack.size(), 0 );
+ ASSERT_EQ( stack.size(), 0u );
v = 1000;
ASSERT_TRUE( !stack.pop( v ) );
EXPECT_EQ( v, 1000 );
ASSERT_TRUE( stack.empty() );
- ASSERT_EQ( stack.size(), 0 );
+ ASSERT_EQ( stack.size(), 0u );
ASSERT_TRUE( stack.push( 10 ) );
ASSERT_TRUE( stack.push( 20 ) );
ASSERT_TRUE( stack.push( 30 ) );
ASSERT_TRUE( !stack.empty() );
- ASSERT_EQ( stack.size(), 3 );
+ ASSERT_EQ( stack.size(), 3u );
while ( stack.pop( v ) );
ASSERT_TRUE( stack.empty() );
- ASSERT_EQ( stack.size(), 0 );
+ ASSERT_EQ( stack.size(), 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:
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_MAP_H
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;
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
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;
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_SET_TEST_INTRUSIVE_SET_H
std::pair<bool, bool> updResult;
- updResult = s.update( i, []( bool bNew, value_type&, value_type& )
+ updResult = s.update( i, []( bool /*bNew*/, value_type&, value_type& )
{
ASSERT_TRUE( false );
}, false );
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_predicate()));
- 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_predicate(), []( 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_TRUE( s.contains( i.nKey ) );
ASSERT_TRUE( s.contains( i ) );
ASSERT_TRUE( s.contains( other_item( i.key() ), other_predicate() ) );
- 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_predicate(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ) );
- EXPECT_EQ( i.nFindCount, 2 );
+ EXPECT_EQ( i.nFindCount, 2u );
value_type v( i );
switch ( i.key() % 6 ) {
ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_predicate() ) );
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_predicate(), []( 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_predicate(), []( value_type& val ) { ++val.nEraseCount; } ));
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nEraseCount, 1u );
break;
}
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_INTRUSIVE_STRIPED_SET_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:
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_SET_TEST_SET_H
std::pair<bool, bool> updResult;
std::string str;
- updResult = s.update( i.key(), []( bool bNew, value_type&, int )
+ updResult = s.update( i.key(), []( bool /*bNew*/, value_type&, int )
{
ASSERT_TRUE( false );
}, false );
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_STRIPED_SET_H
std::pair<bool, bool> updResult;
std::string str;
- updResult = s.update( i.key(), []( bool bNew, value_type&, int )
+ updResult = s.update( i.key(), []( bool, value_type&, int )
{
ASSERT_TRUE( false );
}, false );
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_TREE_TEST_BRONSON_AVLTREE_MAP_PTR_H
EXPECT_EQ( key.nKey, v.nVal );
EXPECT_EQ( std::to_string( key.nKey ), v.strVal );
}));
- ASSERT_FALSE( m.erase_with( other_item( i.nKey ), other_less(), []( key_type const& key, mapped_type& v ) {
+ ASSERT_FALSE( m.erase_with( other_item( i.nKey ), other_less(), []( key_type const& /*key*/, mapped_type& /*v*/ ) {
EXPECT_TRUE( false );
}));
break;
Map::gc::force_dispose();
for ( auto const& item: arrVals ) {
- EXPECT_EQ( item.nDisposeCount, 1 );
+ EXPECT_EQ( item.nDisposeCount, 1u );
}
// clear
Map::gc::force_dispose();
for ( auto const& item : arrVals ) {
- EXPECT_EQ( item.nDisposeCount, 2 );
+ EXPECT_EQ( item.nDisposeCount, 2u );
}
ASSERT_TRUE( m.check_consistency() );
Map::gc::force_dispose();
for ( auto const& item : arrVals ) {
- EXPECT_EQ( item.nDisposeCount, 3 );
+ EXPECT_EQ( item.nDisposeCount, 3u );
}
// extract_min
Map::gc::force_dispose();
for ( auto const& item : arrVals ) {
- EXPECT_EQ( item.nDisposeCount, 4 );
+ EXPECT_EQ( item.nDisposeCount, 4u );
}
// extract_max
Map::gc::force_dispose();
for ( auto const& item : arrVals ) {
- EXPECT_EQ( item.nDisposeCount, 5 );
+ EXPECT_EQ( item.nDisposeCount, 5u );
}
// extract min/max on empty map
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_TREE_TEST_INTRUSIVE_TREE_H
std::pair<bool, bool> updResult;
- updResult = t.update( i, []( bool bNew, value_type&, value_type& )
+ updResult = t.update( i, []( bool, value_type&, value_type& )
{
ASSERT_TRUE( false );
}, false );
i.nUpdateNewCount = 0;
break;
case 2:
- updResult = t.update( i, []( bool bNew, value_type& val, value_type& arg )
+ updResult = t.update( i, []( bool, value_type&, value_type& )
{
EXPECT_TRUE( false );
}, false );
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_TREE_TEST_TREE_MAP_H
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;
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_TREE_SET_H
std::pair<bool, bool> updResult;
std::string str;
- updResult = s.update( i.key(), []( bool bNew, value_type&, int )
+ updResult = s.update( i.key(), []( bool, value_type&, int )
{
ASSERT_TRUE( false );
}, false );
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_less(), []( value_type& v, other_item const& )
{
- EXPECT_EQ( ++v.nFindCount, 3 );
+ EXPECT_EQ( ++v.nFindCount, 3u );
}));
int nKey = i.key() - 1;
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_TREE_SET_HP_H
break;
}
EXPECT_EQ( gp->key(), i.key() );
- EXPECT_EQ( gp->nFindCount, i.key() * 3 );
+ EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
switch ( idx % 3 ) {
case 0: