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:
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 "set_type.h"
size_t nDeleteFailed = 0;
for ( size_t i = 0; i < pool.size(); ++i ) {
cds_test::thread& thr = pool.get( i );
- switch ( thr.type() ) {
+ switch ( thr.type()) {
case insert_thread:
{
InserterThread& inserter = static_cast<InserterThread&>( thr );
<< std::make_pair( "delete_success", nDeleteSuccess )
<< std::make_pair( "insert_failed", nInsertFailed )
<< std::make_pair( "delete_failed", nDeleteFailed )
- << std::make_pair( "final_set_size", testSet.size() );
+ << std::make_pair( "final_set_size", testSet.size());
- testSet.clear();
- EXPECT_TRUE( testSet.empty() );
+ //testSet.clear();
+ for (auto const& str: m_arrString )
+ testSet.erase( str );
+ EXPECT_TRUE( testSet.empty());
+ EXPECT_EQ( testSet.size(), 0u );
additional_check( testSet );
print_stat( propout(), testSet );
size_t nExtractFailed = 0;
for ( size_t i = 0; i < pool.size(); ++i ) {
cds_test::thread& thr = pool.get( i );
- switch ( thr.type() ) {
+ switch ( thr.type()) {
case insert_thread:
{
InserterThread& inserter = static_cast<InserterThread&>(thr);
<< std::make_pair( "insert_failed", nInsertFailed )
<< std::make_pair( "delete_failed", nDeleteFailed )
<< std::make_pair( "extract_failed", nExtractFailed )
- << std::make_pair( "final_set_size", testSet.size() );
+ << std::make_pair( "final_set_size", testSet.size());
- testSet.clear();
- EXPECT_TRUE( testSet.empty() );
+ //testSet.clear();
+ for ( auto const& str : m_arrString )
+ testSet.erase( str );
+ EXPECT_TRUE( testSet.empty());
+ EXPECT_EQ( testSet.size(), 0u );
additional_check( testSet );
print_stat( propout(), testSet );