Merge branch 'dev' into integration
[libcds.git] / test / unit / list / lazy_dhp.cpp
index da84906feb2908ff33f9a6caf2c1e7e19665a397..3ebdcfcd3515cae1e7cc9b3feefa38e80c326884 100644 (file)
@@ -25,7 +25,7 @@
     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_list_hp.h"
@@ -49,7 +49,7 @@ namespace {
         void TearDown()
         {
             cds::threading::Manager::detachThread();
-            cds::gc::hp::GarbageCollector::Destruct();
+            cds::gc::dhp::GarbageCollector::Destruct();
         }
     };
 
@@ -159,4 +159,38 @@ namespace {
         test_hp( l );
     }
 
+    TEST_F( LazyList_DHP, stat )
+    {
+        struct traits: public cc::lazy_list::traits
+        {
+            typedef lt<item> less;
+            typedef cds::atomicity::item_counter item_counter;
+            typedef cds::container::lazy_list::stat<> stat;
+        };
+        typedef cc::LazyList<gc_type, item, traits > list_type;
+
+        list_type l;
+        test_common( l );
+        test_ordered_iterator( l );
+        test_hp( l );
+    }
+
+    TEST_F( LazyList_DHP, wrapped_stat )
+    {
+        struct traits: public cc::lazy_list::traits
+        {
+            typedef lt<item> less;
+            typedef cds::atomicity::item_counter item_counter;
+            typedef cds::container::lazy_list::wrapped_stat<> stat;
+        };
+        typedef cc::LazyList<gc_type, item, traits > list_type;
+
+        cds::container::lazy_list::stat<> st;
+        list_type l( st );
+        test_common( l );
+        test_ordered_iterator( l );
+        test_hp( l );
+    }
+
+
 } // namespace