Added internal statistics for LazyList
[libcds.git] / test / unit / list / kv_michael_nogc.cpp
index 083aa6d59c7295d2c237ac74b5c408994c2f3b61..6f81d5fee8119ec82c39b336bd55ae1ddffef92f 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_kv_list_nogc.h"
@@ -122,4 +122,35 @@ namespace {
         test_ordered_iterator( l );
     }
 
+    TEST_F( MichaelKVList_NOGC, stat )
+    {
+        struct traits: public cc::michael_list::traits
+        {
+            typedef lt less;
+            typedef cds::atomicity::item_counter item_counter;
+            typedef cds::container::michael_list::stat<> stat;
+        };
+        typedef cc::MichaelKVList<gc_type, key_type, value_type, traits > list_type;
+
+        list_type l;
+        test( l );
+        test_ordered_iterator( l );
+    }
+
+    TEST_F( MichaelKVList_NOGC, wrapped_stat )
+    {
+        struct traits: public cc::michael_list::traits
+        {
+            typedef lt less;
+            typedef cds::atomicity::item_counter item_counter;
+            typedef cds::container::michael_list::wrapped_stat<> stat;
+        };
+        typedef cc::MichaelKVList<gc_type, key_type, value_type, traits > list_type;
+
+        cds::container::michael_list::stat<> st;
+        list_type l( st );
+        test( l );
+        test_ordered_iterator( l );
+    }
+
 } // namespace