X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Funit%2Fset%2Ftest_ordered_set_hp.h;h=3399ca9a3e30829e1ccde90623b627a074c50502;hb=8537a90c3f99446df049ca63b4195a1c587309cc;hp=255e92077e66c41db1991b3a6b07a1a80903ff30;hpb=7448008aa977fe42a83738fbbc63ce11d8ab86f9;p=libcds.git diff --git a/test/unit/set/test_ordered_set_hp.h b/test/unit/set/test_ordered_set_hp.h index 255e9207..3399ca9a 100644 --- a/test/unit/set/test_ordered_set_hp.h +++ b/test/unit/set/test_ordered_set_hp.h @@ -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,7 +25,7 @@ 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. */ #ifndef CDSUNIT_SET_TEST_ORDERED_SET_HP_H @@ -48,7 +48,7 @@ namespace cds_test { base_class::test( s ); - ASSERT_TRUE( s.empty() ); + ASSERT_TRUE( s.empty()); ASSERT_CONTAINER_SIZE( s, 0 ); typedef typename Set::value_type value_type; @@ -59,15 +59,15 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key) ) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } - shuffle( indices.begin(), indices.end() ); + shuffle( indices.begin(), indices.end()); for ( auto i : indices ) { ASSERT_TRUE( s.insert( data[i] )); } - ASSERT_FALSE( s.empty() ); + ASSERT_FALSE( s.empty()); ASSERT_CONTAINER_SIZE( s, nSetSize ); typedef typename Set::guarded_ptr guarded_ptr; @@ -76,7 +76,7 @@ namespace cds_test { // extract_min size_t nCount = 0; int nKey = -1; - while ( !s.empty() ) { + while ( !s.empty()) { gp = s.extract_min(); ASSERT_FALSE( !gp ); EXPECT_EQ( nKey + 1, gp->key()); @@ -86,19 +86,19 @@ namespace cds_test { gp.release(); EXPECT_EQ( nCount, nSetSize ); - ASSERT_TRUE( s.empty() ); + ASSERT_TRUE( s.empty()); ASSERT_CONTAINER_SIZE( s, 0 ); // extract_max for ( auto i : indices ) { - ASSERT_TRUE( s.insert( data[i] ) ); + ASSERT_TRUE( s.insert( data[i] )); } - ASSERT_FALSE( s.empty() ); + ASSERT_FALSE( s.empty()); ASSERT_CONTAINER_SIZE( s, nSetSize ); nCount = 0; nKey = nSetSize; - while ( !s.empty() ) { + while ( !s.empty()) { gp = s.extract_max(); ASSERT_FALSE( !gp ); EXPECT_EQ( nKey - 1, gp->key()); @@ -108,7 +108,7 @@ namespace cds_test { gp.release(); EXPECT_EQ( nCount, nSetSize ); - ASSERT_TRUE( s.empty() ); + ASSERT_TRUE( s.empty()); ASSERT_CONTAINER_SIZE( s, 0 ); } };