Added erase_at( iterator ) function to MichaelHashSet/Map and SplitListSet/Map based...
[libcds.git] / test / unit / list / test_iterable_list.h
index 9233a842f1f52c5899f56b4ab41cf0f58073469d..5dd9ef1959c80c668f6490eb161ec41dfc3add55 100644 (file)
@@ -394,7 +394,12 @@ namespace cds_test {
             }
             EXPECT_EQ( static_cast<size_t>(key), nSize );
 
-            l.clear();
+            // erase_at()
+            for ( auto it = l.begin(); it != l.end(); ++it ) {
+                EXPECT_TRUE( l.erase_at( it ));
+                EXPECT_FALSE( l.erase_at( it ));
+            }
+
             ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
         }