From: khizmax Date: Mon, 2 Mar 2015 20:38:34 +0000 (+0300) Subject: Fixed Bronson AVL-Tree tests X-Git-Tag: v2.1.0~305^2~47 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=82bd55eec485ad10b6cecb49f06ef14ae73804fe;p=libcds.git Fixed Bronson AVL-Tree tests --- diff --git a/tests/unit/map2/map_defs.h b/tests/unit/map2/map_defs.h index 4667f27c..99e3003a 100644 --- a/tests/unit/map2/map_defs.h +++ b/tests/unit/map2/map_defs.h @@ -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)\ diff --git a/tests/unit/map2/map_types.h b/tests/unit/map2/map_types.h index 75181375..5c1c3eb7 100644 --- a/tests/unit/map2/map_types.h +++ b/tests/unit/map2/map_types.h @@ -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