Fixed Bronson AVL-Tree tests
authorkhizmax <libcds.dev@gmail.com>
Mon, 2 Mar 2015 20:38:34 +0000 (23:38 +0300)
committerkhizmax <libcds.dev@gmail.com>
Mon, 2 Mar 2015 20:38:34 +0000 (23:38 +0300)
tests/unit/map2/map_defs.h
tests/unit/map2/map_types.h

index 4667f27c3735e2c93612289c69ce58a8b266f0b7..99e3003af70aef5d7411e8f21d0d8b914b8b5f6a 100644 (file)
@@ -437,12 +437,8 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat)
 #   define CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal \
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less) \
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less) \
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_stat) \
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_stat) \
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_cmp_ic) \
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_cmp_ic) \
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_cmp_ic_stat) \
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_cmp_ic_stat) \
+    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_cmp_stat) \
+    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_cmp_stat) \
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_simple) \
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_simple) \
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \
@@ -459,12 +455,8 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat)
 #   define CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal \
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less) \
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less) \
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_stat) \
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_stat) \
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_cmp_ic) \
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_cmp_ic) \
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_cmp_ic_stat) \
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_cmp_ic_stat) \
+    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_cmp_stat) \
+    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_cmp_stat) \
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_simple) \
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_simple) \
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \
@@ -487,15 +479,9 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat)
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less)\
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less)\
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_stat)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_stat)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_stat)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_cmp_ic)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_cmp_ic)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_cmp_ic)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_cmp_ic_stat)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_cmp_ic_stat)\
-    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_cmp_ic_stat)\
+    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_cmp_stat)\
+    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_cmp_stat)\
+    TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_cmp_stat)\
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\
     TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\
@@ -520,15 +506,9 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat)
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less)\
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less)\
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_stat)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_stat)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_stat)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_ic)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_cmp_ic)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_cmp_ic)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_ic_stat)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_cmp_ic_stat)\
-    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_cmp_ic_stat)\
+    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_stat)\
+    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_cmp_stat)\
+    CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_cmp_stat)\
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\
index 751813750af5392376d6d15c0a7ca840f9107af5..5c1c3eb7a977bf1be4f7c47c5fc31c50b5455aae 100644 (file)
@@ -1728,6 +1728,7 @@ namespace map2 {
             cc::bronson_avltree::make_traits<
                 co::less< less >
                 ,cc::bronson_avltree::relaxed_insert< false >
+                ,co::item_counter< cds::atomicity::item_counter >
             >::type
         {};
         typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpi_less;
@@ -1737,41 +1738,20 @@ namespace map2 {
         typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_shb_less;
         typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_sht_less;
 #endif
-        struct BronsonAVLTreeMap_less_stat : public BronsonAVLTreeMap_less
-        {
-            typedef cc::bronson_avltree::stat<> stat;
-        };
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_gpi_less_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_gpb_less_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_gpt_less_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_shb_less_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_sht_less_stat;
-#endif
-        struct BronsonAVLTreeMap_cmp_ic: public 
+        struct BronsonAVLTreeMap_cmp_stat: public 
             cc::bronson_avltree::make_traits<
-                co::less< compare >
-                ,cc::bronson_avltree::relaxed_insert< true >
+                co::compare< compare >
+                ,cc::bronson_avltree::relaxed_insert< false >
                 ,co::item_counter< cds::atomicity::item_counter >
+                ,co::stat< cc::bronson_avltree::stat<>>
             >::type
         {};
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_gpi_cmp_ic;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_gpb_cmp_ic;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_gpt_cmp_ic;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_shb_cmp_ic;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_sht_cmp_ic;
-#endif
-        struct BronsonAVLTreeMap_cmp_ic_stat : public BronsonAVLTreeMap_cmp_ic
-        {
-            typedef cc::bronson_avltree::stat<> stat;
-        };
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_gpi_cmp_ic_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_gpb_cmp_ic_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_gpt_cmp_ic_stat;
+        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpi_cmp_stat;
+        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpb_cmp_stat;
+        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpt_cmp_stat;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_shb_cmp_ic_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_sht_cmp_ic_stat;
+        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_shb_cmp_stat;
+        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_sht_cmp_stat;
 #endif
 
         struct BronsonAVLTreeMap_less_pool_simple: public BronsonAVLTreeMap_less