X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Fstress%2Fstack%2Fintrusive_push_pop.cpp;h=dc2161ccdda9a2e5ce18e845c6fe0d0c445d0c59;hb=907e8f3e384f7161e35dc41ddc3a78c2bb86013b;hp=3b89e7bf594148a7dca16fab0988028dc19535cf;hpb=7f0c81027ac79be9b024a484357841734746a4da;p=libcds.git diff --git a/test/stress/stack/intrusive_push_pop.cpp b/test/stress/stack/intrusive_push_pop.cpp index 3b89e7bf..dc2161cc 100644 --- a/test/stress/stack/intrusive_push_pop.cpp +++ b/test/stress/stack/intrusive_push_pop.cpp @@ -1,11 +1,11 @@ /* This file is a part of libcds - Concurrent Data Structures library - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017 Source code repo: http://github.com/khizmax/libcds/ Download: http://sourceforge.net/projects/libcds/files/ - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -25,10 +25,11 @@ 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 "intrusive_stack_push_pop.h" +#include "../misc/common.h" namespace cds_test { /*static*/ size_t intrusive_stack_push_pop::s_nPushThreadCount = 4; @@ -89,9 +90,9 @@ namespace { { EXPECT_EQ( s.m_PushCount.get() + s.m_ActivePushCollision.get() + s.m_PassivePushCollision.get(), s_nStackSize ); EXPECT_EQ( s.m_PopCount.get() + s.m_ActivePopCollision.get() + s.m_PassivePopCollision.get(), s_nStackSize ); - EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get() ); - EXPECT_EQ( s.m_ActivePopCollision.get(), s.m_PassivePushCollision.get() ); - EXPECT_EQ( s.m_ActivePushCollision.get(), s.m_PassivePopCollision.get() ); + EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get()); + EXPECT_EQ( s.m_ActivePopCollision.get(), s.m_PassivePushCollision.get()); + EXPECT_EQ( s.m_ActivePushCollision.get(), s.m_PassivePopCollision.get()); } template @@ -101,7 +102,7 @@ namespace { { Stack stack( s_nEliminationSize ); do_test( stack, arrValue ); - check_elimination_stat( stack.statistics() ); + check_elimination_stat( stack.statistics()); } Stack::gc::force_dispose(); } @@ -173,8 +174,10 @@ namespace { test_std< stack_type >(); \ } - CDSSTRESS_StdStack( intrusive_stack_push_pop ) + //CDSSTRESS_StdStack( intrusive_stack_push_pop ) #undef CDSSTRESS_Stack_F + //INSTANTIATE_TEST_CASE_P( a, intrusive_stack_push_pop, ::testing::Values(1)); + } // namespace