movable exempt_ptr: LazyList
[libcds.git] / tests / test-hdr / ordered_list / hdr_lazy_kv.h
index 1aef413f2a665abe7abaad2ff04246e7723653ba..5c6bbdb042ca181842cbc640fab62c4b1765201f 100644 (file)
@@ -387,7 +387,8 @@ namespace ordlist {
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
-                        CPPUNIT_ASSERT( l.extract( ep, a[i] ));
+                        ep = l.extract( a[i] );
+                        CPPUNIT_ASSERT( ep );
                         CPPUNIT_ASSERT( !ep.empty() );
                         CPPUNIT_CHECK( ep->first == a[i] );
                         CPPUNIT_CHECK( (*ep).second.m_val == a[i] * 2 );
@@ -396,7 +397,8 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
-                        CPPUNIT_CHECK( !l.extract( ep, a[i] ));
+                        ep = l.extract( a[i] );
+                        CPPUNIT_CHECK( !ep );
                         CPPUNIT_CHECK( ep.empty() );
                     }
                 }
@@ -405,8 +407,8 @@ namespace ordlist {
                 {
                     rcu_lock lock;
                     CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
-                    CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
-                    CPPUNIT_CHECK( ep.empty() );
+                    CPPUNIT_CHECK( !l.extract( a[0] ) );
+                    //CPPUNIT_CHECK( ep.empty() );
                 }
 
                 // extract_with/get_with
@@ -423,7 +425,8 @@ namespace ordlist {
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
-                        CPPUNIT_ASSERT( l.extract_with( ep, itm, other_less() ));
+                        ep = l.extract_with( itm, other_less() );
+                        CPPUNIT_ASSERT( ep );
                         CPPUNIT_ASSERT( !ep.empty() );
                         CPPUNIT_CHECK( ep->first == a[i] );
                         CPPUNIT_CHECK( ep->second.m_val == a[i] * 2 );
@@ -432,7 +435,8 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         CPPUNIT_CHECK( l.get_with( itm, other_less()) == nullptr );
-                        CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
+                        ep = l.extract_with( itm, other_less() );
+                        CPPUNIT_CHECK( !ep );
                         CPPUNIT_CHECK( ep.empty() );
                     }
                 }
@@ -441,7 +445,7 @@ namespace ordlist {
                 {
                     rcu_lock lock;
                     CPPUNIT_CHECK( l.get_with( 3.14f, other_less() ) == nullptr );
-                    CPPUNIT_CHECK( !l.extract_with( ep, 3.14f, other_less() ));
+                    CPPUNIT_CHECK( !l.extract_with( 3.14f, other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
             }