projects
/
libcds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only runs standard stack test cases
[libcds.git]
/
test
/
stress
/
stack
/
push.cpp
diff --git
a/test/stress/stack/push.cpp
b/test/stress/stack/push.cpp
index 8fd5f19bd3a1fd083d0ca3d222a9580dbe662368..491ef1aff5c831127a7a7148e1e031361730851b 100644
(file)
--- a/
test/stress/stack/push.cpp
+++ b/
test/stress/stack/push.cpp
@@
-1,7
+1,7
@@
/*
This file is a part of libcds - Concurrent Data Structures library
/*
This file is a part of libcds - Concurrent Data Structures library
- (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-201
6
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-201
7
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
@@
-86,7
+86,7
@@
namespace {
value_type v;
v.nThread = id();
for ( v.nNo = m_nStartItem; v.nNo < m_nEndItem; ++v.nNo ) {
value_type v;
v.nThread = id();
for ( v.nNo = m_nStartItem; v.nNo < m_nEndItem; ++v.nNo ) {
- if ( !m_stack.push( v )
)
+ if ( !m_stack.push( v ))
++m_nPushError;
}
}
++m_nPushError;
}
}
@@
-145,7
+145,7
@@
namespace {
void test_elimination( Stack& stack )
{
test( stack );
void test_elimination( Stack& stack )
{
test( stack );
- check_elimination_stat( stack.statistics()
);
+ check_elimination_stat( stack.statistics());
}
void check_elimination_stat( cds::container::treiber_stack::empty_stat const& )
}
void check_elimination_stat( cds::container::treiber_stack::empty_stat const& )
@@
-153,7
+153,7
@@
namespace {
void check_elimination_stat( cds::container::treiber_stack::stat<> const& s )
{
void check_elimination_stat( cds::container::treiber_stack::stat<> const& s )
{
- EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get()
);
+ EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get());
}
template <class Stack>
}
template <class Stack>
@@
-167,7
+167,7
@@
namespace {
for ( size_t i = 0; i < pool.size(); ++i ) {
Producer<Stack>& producer = static_cast<Producer<Stack>&>( pool.get( i ));
for ( size_t i = 0; i < pool.size(); ++i ) {
Producer<Stack>& producer = static_cast<Producer<Stack>&>( pool.get( i ));
- EXPECT_EQ( producer.m_nPushError, 0 ) << "Producer=" << i;
+ EXPECT_EQ( producer.m_nPushError, 0
u
) << "Producer=" << i;
aThread[producer.id()] = producer.m_nEndItem - 1;
}
EXPECT_FALSE( testStack.empty());
aThread[producer.id()] = producer.m_nEndItem - 1;
}
EXPECT_FALSE( testStack.empty());
@@
-193,16
+193,16
@@
namespace {
size_t nError = 0;
for ( size_t i = 0; i < nTotalItems; ++i ) {
EXPECT_EQ( arr[i], 1 ) << "i=" << i;
size_t nError = 0;
for ( size_t i = 0; i < nTotalItems; ++i ) {
EXPECT_EQ( arr[i], 1 ) << "i=" << i;
- if ( ++nError > 10 )
+ if ( ++nError > 10 )
{
ASSERT_EQ( arr[i], 1 );
ASSERT_EQ( arr[i], 1 );
+ }
}
}
};
CDSSTRESS_TreiberStack( stack_push )
CDSSTRESS_EliminationStack( stack_push )
}
}
};
CDSSTRESS_TreiberStack( stack_push )
CDSSTRESS_EliminationStack( stack_push )
- CDSSTRESS_FCStack( stack_push )
- CDSSTRESS_FCDeque( stack_push )
- CDSSTRESS_StdStack( stack_push )
+ //CDSSTRESS_FCStack( stack_push )
+ //CDSSTRESS_FCDeque( stack_push )
} // namespace
} // namespace