Renaming map member function insert_key() to insert_with()
[libcds.git] / tests / test-hdr / map / hdr_skiplist_map.h
index 1614529467e32cda7c214914cda28cde3e84e82d..e21aaaa333b7222b5925871b2a9d378527625cf1 100644 (file)
@@ -152,12 +152,14 @@ namespace map {
                     CPPUNIT_ASSERT( !gp.empty());
                     CPPUNIT_CHECK( gp->first == nKey );
                     CPPUNIT_CHECK( gp->second.m_val == nKey * 2 );
+                    gp.release();
 
                     gp = m.extract( nKey );
                     CPPUNIT_ASSERT( gp );
                     CPPUNIT_ASSERT( !gp.empty());
                     CPPUNIT_CHECK( gp->first == nKey );
                     CPPUNIT_CHECK( gp->second.m_val == nKey * 2 );
+                    gp.release();
 
                     gp = m.get( nKey );
                     CPPUNIT_CHECK( !gp );
@@ -177,12 +179,14 @@ namespace map {
                     CPPUNIT_ASSERT( !gp.empty());
                     CPPUNIT_CHECK( gp->first == nKey );
                     CPPUNIT_CHECK( gp->second.m_val == nKey * 2 );
+                    gp.release();
                     
                     gp = m.extract_with( wrapped_item( nKey ), wrapped_less());
                     CPPUNIT_ASSERT( gp );
                     CPPUNIT_ASSERT( !gp.empty());
                     CPPUNIT_CHECK( gp->first == nKey );
                     CPPUNIT_CHECK( gp->second.m_val == nKey * 2 );
+                    gp.release();
 
                     gp = m.get_with( wrapped_item( nKey ), wrapped_less() );
                     CPPUNIT_CHECK( !gp );
@@ -219,7 +223,7 @@ namespace map {
                     gp.release();
                     CPPUNIT_CHECK( gp.empty());
                 }
-                CPPUNIT_CHECK( m.extract_max());
+                CPPUNIT_CHECK( !m.extract_max());
                 CPPUNIT_CHECK( gp.empty());
                 CPPUNIT_ASSERT( m.empty());
             }
@@ -259,7 +263,7 @@ namespace map {
             CPPUNIT_ASSERT( it->second.m_val == 200 );
 
             CPPUNIT_ASSERT( m.find(55) == m.end() );
-            it = m.insert_key( 55, insert_functor<Map>() );
+            it = m.insert_with( 55, insert_functor<Map>() );
             CPPUNIT_ASSERT( it != m.end() );
             CPPUNIT_ASSERT( !m.empty() );
             CPPUNIT_ASSERT( check_size( m, 3 ));
@@ -269,7 +273,7 @@ namespace map {
 
             CPPUNIT_ASSERT( m.insert( 55 ) == m.end() );
             CPPUNIT_ASSERT( m.insert( 55, 10 ) == m.end() );
-            CPPUNIT_ASSERT( m.insert_key( 55, insert_functor<Map>()) == m.end() );
+            CPPUNIT_ASSERT( m.insert_with( 55, insert_functor<Map>()) == m.end() );
 
             CPPUNIT_ASSERT( m.find(10) != m.end() );
             std::pair<iterator, bool> ensureResult = m.ensure( 10 );