From: khizmax Date: Fri, 15 Jan 2016 21:26:08 +0000 (+0300) Subject: Renamed test namespace X-Git-Tag: v2.2.0~425 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=74749c2db48b3caca04bbbb75810614bd837eaf4;p=libcds.git Renamed test namespace --- diff --git a/test/unit/stack/intrusive_treiber_stack_dhp.cpp b/test/unit/stack/intrusive_treiber_stack_dhp.cpp index c92ecf9d..7fe331de 100644 --- a/test/unit/stack/intrusive_treiber_stack_dhp.cpp +++ b/test/unit/stack/intrusive_treiber_stack_dhp.cpp @@ -27,24 +27,24 @@ 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. */ - -#include "test_intrusive_treiber_stack.h" - -#include -#include - -namespace { - - namespace ci = cds::intrusive; - - class IntrusiveTreiberStack_DHP : public cds_gtest::IntrusiveTreiberStack - { - typedef cds_gtest::IntrusiveTreiberStack base_class; - protected: - typedef cds::gc::DHP gc_type; - - void SetUp() - { + +#include "test_intrusive_treiber_stack.h" + +#include +#include + +namespace { + + namespace ci = cds::intrusive; + + class IntrusiveTreiberStack_DHP : public cds_test::IntrusiveTreiberStack + { + typedef cds_test::IntrusiveTreiberStack base_class; + protected: + typedef cds::gc::DHP gc_type; + + void SetUp() + { typedef cds::intrusive::TreiberStack< gc_type, base_hook_item , typename ci::treiber_stack::make_traits< @@ -55,32 +55,32 @@ namespace { > >::type > stack_type; - - cds::gc::dhp::GarbageCollector::Construct( 16, stack_type::c_nHazardPtrCount ); - cds::threading::Manager::attachThread(); - } - - void TearDown() - { - cds::threading::Manager::detachThread(); - cds::gc::dhp::GarbageCollector::Destruct(); - } - - template - void test() - { - Stack stack; - base_class::test( stack ); - } - - template - void test_dyn( size_t elimination_size ) - { - Stack stack( elimination_size ); - base_class::test( stack ); - } - }; - + + cds::gc::dhp::GarbageCollector::Construct( 16, stack_type::c_nHazardPtrCount ); + cds::threading::Manager::attachThread(); + } + + void TearDown() + { + cds::threading::Manager::detachThread(); + cds::gc::dhp::GarbageCollector::Destruct(); + } + + template + void test() + { + Stack stack; + base_class::test( stack ); + } + + template + void test_dyn( size_t elimination_size ) + { + Stack stack( elimination_size ); + base_class::test( stack ); + } + }; + TEST_F( IntrusiveTreiberStack_DHP, base ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -175,7 +175,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_DHP, elimination_base ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -192,7 +192,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_DHP, elimination_base_dynamic ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -210,7 +210,7 @@ namespace { test_dyn( 2 ); } - + TEST_F( IntrusiveTreiberStack_DHP, elimination_base_disposer ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -226,7 +226,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_DHP, elimination_member ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -244,7 +244,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_DHP, elimination_member_dynamic ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -263,7 +263,7 @@ namespace { test_dyn( 2 ); } - + TEST_F( IntrusiveTreiberStack_DHP, elimination_member_disposer ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -283,6 +283,6 @@ namespace { test_dyn( 2 ); } - -} // namespace - + +} // namespace + diff --git a/test/unit/stack/intrusive_treiber_stack_hp.cpp b/test/unit/stack/intrusive_treiber_stack_hp.cpp index a6d5bc6f..64e9859b 100644 --- a/test/unit/stack/intrusive_treiber_stack_hp.cpp +++ b/test/unit/stack/intrusive_treiber_stack_hp.cpp @@ -27,51 +27,51 @@ 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. */ - -#include "test_intrusive_treiber_stack.h" - -#include -#include - -namespace { - - namespace ci = cds::intrusive; - typedef cds::gc::HP gc_type; - - class IntrusiveTreiberStack_HP : public cds_gtest::IntrusiveTreiberStack - { - typedef cds_gtest::IntrusiveTreiberStack base_class; - - protected: - void SetUp() - { - typedef cds::intrusive::TreiberStack< gc_type, base_hook_item> stack_type; - - cds::gc::hp::GarbageCollector::Construct( stack_type::c_nHazardPtrCount, 1, 16 ); - cds::threading::Manager::attachThread(); - } - - void TearDown() - { - cds::threading::Manager::detachThread(); - cds::gc::hp::GarbageCollector::Destruct( true ); - } - - template - void test() - { - Stack stack; - base_class::test( stack ); - } - - template - void test_dyn( size_t elimination_size ) - { - Stack stack( elimination_size ); - base_class::test( stack ); - } - }; - + +#include "test_intrusive_treiber_stack.h" + +#include +#include + +namespace { + + namespace ci = cds::intrusive; + typedef cds::gc::HP gc_type; + + class IntrusiveTreiberStack_HP : public cds_test::IntrusiveTreiberStack + { + typedef cds_test::IntrusiveTreiberStack base_class; + + protected: + void SetUp() + { + typedef cds::intrusive::TreiberStack< gc_type, base_hook_item> stack_type; + + cds::gc::hp::GarbageCollector::Construct( stack_type::c_nHazardPtrCount, 1, 16 ); + cds::threading::Manager::attachThread(); + } + + void TearDown() + { + cds::threading::Manager::detachThread(); + cds::gc::hp::GarbageCollector::Destruct( true ); + } + + template + void test() + { + Stack stack; + base_class::test( stack ); + } + + template + void test_dyn( size_t elimination_size ) + { + Stack stack( elimination_size ); + base_class::test( stack ); + } + }; + TEST_F( IntrusiveTreiberStack_HP, defaulted ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -170,7 +170,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_HP, elimination ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -182,7 +182,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_HP, elimination_base ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -199,7 +199,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_HP, elimination_base_dynamic ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -217,7 +217,7 @@ namespace { test_dyn( 2 ); } - + TEST_F( IntrusiveTreiberStack_HP, elimination_base_disposer ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -233,7 +233,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_HP, elimination_member ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -251,7 +251,7 @@ namespace { test(); } - + TEST_F( IntrusiveTreiberStack_HP, elimination_member_dynamic ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -270,7 +270,7 @@ namespace { test_dyn( 2 ); } - + TEST_F( IntrusiveTreiberStack_HP, elimination_member_disposer ) { typedef cds::intrusive::TreiberStack< gc_type, @@ -290,6 +290,6 @@ namespace { test_dyn( 2 ); } - -} // namespace - + +} // namespace + diff --git a/test/unit/stack/test_intrusive_treiber_stack.h b/test/unit/stack/test_intrusive_treiber_stack.h index b6a72afe..92874d4f 100644 --- a/test/unit/stack/test_intrusive_treiber_stack.h +++ b/test/unit/stack/test_intrusive_treiber_stack.h @@ -34,7 +34,7 @@ #include #include -namespace cds_gtest { +namespace cds_test { class IntrusiveTreiberStack : public ::testing::Test { @@ -129,6 +129,6 @@ namespace cds_gtest { } }; -} // namespace cds_gtest +} // namespace cds_test #endif // CDSUNIT_STACK_INTRUSIVE_TREIBER_STACK_H diff --git a/test/unit/stack/test_treiber_stack.h b/test/unit/stack/test_treiber_stack.h index d8227347..d6d058c8 100644 --- a/test/unit/stack/test_treiber_stack.h +++ b/test/unit/stack/test_treiber_stack.h @@ -33,7 +33,7 @@ #include -namespace cds_gtest { +namespace cds_test { class TreiberStack : public ::testing::Test { @@ -82,6 +82,6 @@ namespace cds_gtest { Stack::gc::scan(); } }; -} // namespace cds_gtest +} // namespace cds_test #endif // CDSUNIT_STACK_TREIBER_STACK_H diff --git a/test/unit/stack/treiber_stack_dhp.cpp b/test/unit/stack/treiber_stack_dhp.cpp index 3eef2fb7..a2abb8c8 100644 --- a/test/unit/stack/treiber_stack_dhp.cpp +++ b/test/unit/stack/treiber_stack_dhp.cpp @@ -27,58 +27,58 @@ 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. */ - -#include "test_treiber_stack.h" - -#include -#include - -namespace { - - namespace cc = cds::container; - typedef cds::gc::DHP gc_type; - - class TreiberStack_DHP : public cds_gtest::TreiberStack - { - typedef cds_gtest::TreiberStack base_class; - - protected: - void SetUp() - { - typedef cc::TreiberStack< gc_type, int > stack_type; - - cds::gc::dhp::GarbageCollector::Construct( 16, stack_type::c_nHazardPtrCount ); - cds::threading::Manager::attachThread(); - } - - void TearDown() - { - cds::threading::Manager::detachThread(); - cds::gc::dhp::GarbageCollector::Destruct(); - } - - template - void test() - { - Stack stack; - base_class::test( stack ); - } - - template - void test_dyn( size_t elimination_size ) - { - Stack stack( elimination_size ); - base_class::test( stack ); - } - }; - + +#include "test_treiber_stack.h" + +#include +#include + +namespace { + + namespace cc = cds::container; + typedef cds::gc::DHP gc_type; + + class TreiberStack_DHP : public cds_test::TreiberStack + { + typedef cds_test::TreiberStack base_class; + + protected: + void SetUp() + { + typedef cc::TreiberStack< gc_type, int > stack_type; + + cds::gc::dhp::GarbageCollector::Construct( 16, stack_type::c_nHazardPtrCount ); + cds::threading::Manager::attachThread(); + } + + void TearDown() + { + cds::threading::Manager::detachThread(); + cds::gc::dhp::GarbageCollector::Destruct(); + } + + template + void test() + { + Stack stack; + base_class::test( stack ); + } + + template + void test_dyn( size_t elimination_size ) + { + Stack stack( elimination_size ); + base_class::test( stack ); + } + }; + TEST_F( TreiberStack_DHP, defaulted ) { typedef cc::TreiberStack< gc_type, int > stack_type; test(); } - + TEST_F( TreiberStack_DHP, backoff ) { typedef cc::TreiberStack< gc_type, int @@ -89,7 +89,7 @@ namespace { test(); } - + TEST_F( TreiberStack_DHP, alloc ) { // allocator must be rebinded for real value type @@ -111,7 +111,7 @@ namespace { test(); } - + TEST_F( TreiberStack_DHP, elimination ) { typedef cc::TreiberStack< gc_type, int @@ -122,7 +122,7 @@ namespace { test(); } - + TEST_F( TreiberStack_DHP, elimination_backoff ) { struct traits : public cc::treiber_stack::traits @@ -136,7 +136,7 @@ namespace { test(); } - + TEST_F( TreiberStack_DHP, elimination_dynamic ) { typedef cc::TreiberStack< gc_type, int @@ -148,7 +148,7 @@ namespace { test_dyn( 4 ); } - + TEST_F( TreiberStack_DHP, elimination_stat ) { typedef cc::TreiberStack< gc_type, int @@ -160,7 +160,7 @@ namespace { test(); } - + TEST_F( TreiberStack_DHP, elimination_dynamic_backoff ) { struct traits : public cc::treiber_stack::traits @@ -175,5 +175,5 @@ namespace { test_dyn( 2 ); } - -} // namespace + +} // namespace diff --git a/test/unit/stack/treiber_stack_hp.cpp b/test/unit/stack/treiber_stack_hp.cpp index ca617ebd..1ebba3f2 100644 --- a/test/unit/stack/treiber_stack_hp.cpp +++ b/test/unit/stack/treiber_stack_hp.cpp @@ -27,58 +27,58 @@ 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. */ - -#include "test_treiber_stack.h" - -#include -#include - -namespace { - - namespace cc = cds::container; - typedef cds::gc::HP gc_type; - - class TreiberStack_HP : public cds_gtest::TreiberStack - { - typedef cds_gtest::TreiberStack base_class; - - protected: - void SetUp() - { - typedef cc::TreiberStack< gc_type, int > stack_type; - - cds::gc::hp::GarbageCollector::Construct( stack_type::c_nHazardPtrCount, 1, 16 ); - cds::threading::Manager::attachThread(); - } - - void TearDown() - { - cds::threading::Manager::detachThread(); - cds::gc::hp::GarbageCollector::Destruct( true ); - } - - template - void test() - { - Stack stack; - base_class::test( stack ); - } - - template - void test_dyn( size_t elimination_size ) - { - Stack stack( elimination_size ); - base_class::test( stack ); - } - }; - + +#include "test_treiber_stack.h" + +#include +#include + +namespace { + + namespace cc = cds::container; + typedef cds::gc::HP gc_type; + + class TreiberStack_HP : public cds_test::TreiberStack + { + typedef cds_test::TreiberStack base_class; + + protected: + void SetUp() + { + typedef cc::TreiberStack< gc_type, int > stack_type; + + cds::gc::hp::GarbageCollector::Construct( stack_type::c_nHazardPtrCount, 1, 16 ); + cds::threading::Manager::attachThread(); + } + + void TearDown() + { + cds::threading::Manager::detachThread(); + cds::gc::hp::GarbageCollector::Destruct( true ); + } + + template + void test() + { + Stack stack; + base_class::test( stack ); + } + + template + void test_dyn( size_t elimination_size ) + { + Stack stack( elimination_size ); + base_class::test( stack ); + } + }; + TEST_F( TreiberStack_HP, defaulted ) { typedef cc::TreiberStack< gc_type, int > stack_type; test(); } - + TEST_F( TreiberStack_HP, backoff ) { typedef cc::TreiberStack< gc_type, int @@ -89,7 +89,7 @@ namespace { test(); } - + TEST_F( TreiberStack_HP, alloc ) { // allocator must be rebinded for real value type @@ -105,7 +105,7 @@ namespace { test(); } - + TEST_F( TreiberStack_HP, elimination ) { typedef cc::TreiberStack< gc_type, int @@ -116,7 +116,7 @@ namespace { test(); } - + TEST_F( TreiberStack_HP, elimination_backoff ) { struct traits : public cc::treiber_stack::traits @@ -130,7 +130,7 @@ namespace { test(); } - + TEST_F( TreiberStack_HP, elimination_dynamic ) { typedef cc::TreiberStack< gc_type, int @@ -142,7 +142,7 @@ namespace { test_dyn( 4 ); } - + TEST_F( TreiberStack_HP, elimination_stat ) { typedef cc::TreiberStack< gc_type, int @@ -154,7 +154,7 @@ namespace { test(); } - + TEST_F( TreiberStack_HP, elimination_dynamic_backoff ) { struct traits : public cc::treiber_stack::traits @@ -169,5 +169,5 @@ namespace { test_dyn( 2 ); } - -} // namespace + +} // namespace