Removed redundant spaces
[libcds.git] / test / unit / intrusive-list / test_intrusive_iterable_list.h
index 278b16cacf8780762cd8862c53ed7ecc5770d309..5d45600d599b34e39aa1c25d955855bf34bf41c8 100644 (file)
@@ -62,7 +62,7 @@ namespace cds_test {
 
             stat& operator =( const stat& s )
             {
-                memcpy( this, &s, sizeof( s ) );
+                memcpy( this, &s, sizeof( s ));
                 return *this;
             }
         };
@@ -150,7 +150,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -166,7 +166,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()( const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -232,7 +232,7 @@ namespace cds_test {
             shuffle( arr, arr + nSize );
             shuffle( arr2, arr2 + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             typedef typename List::iterator iterator;
@@ -293,7 +293,7 @@ namespace cds_test {
                 EXPECT_TRUE( l.contains( i.nKey ));
                 EXPECT_TRUE( l.contains( i ));
                 EXPECT_TRUE( l.contains( other_item( i.nKey ), other_less()));
-                EXPECT_FALSE( l.find( i.nKey ) == l.end() );
+                EXPECT_FALSE( l.find( i.nKey ) == l.end());
                 EXPECT_TRUE( l.find( i.nKey, []( value_type& item, int ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 1 );
                 EXPECT_TRUE( l.find( i, []( value_type& item, value_type const& ) { ++item.s.nFindCall; } ));
@@ -301,27 +301,27 @@ namespace cds_test {
                 EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 3 );
 
-                EXPECT_FALSE( l.insert( i ) );
-                ASSERT_FALSE( l.empty() );
+                EXPECT_FALSE( l.insert( i ));
+                ASSERT_FALSE( l.empty());
 
                 int const ckey = i.nKey;
                 iterator it = l.find( ckey );
-                ASSERT_FALSE( it == l.end() );
+                ASSERT_FALSE( it == l.end());
                 EXPECT_EQ( it->nKey, i.nKey );
                 EXPECT_EQ( (*it).nVal, i.nVal );
-                check_ordered( it, l.end() );
+                check_ordered( it, l.end());
 
                 it = l.find( i.nKey );
-                ASSERT_FALSE( it == l.end() );
+                ASSERT_FALSE( it == l.end());
                 EXPECT_EQ( it->nKey, i.nKey );
                 EXPECT_EQ( (*it).nVal, i.nVal );
-                check_ordered( it, l.end() );
+                check_ordered( it, l.end());
 
-                it = l.find_with( other_item( i.nKey ), other_less() );
-                ASSERT_FALSE( it == l.end() );
+                it = l.find_with( other_item( i.nKey ), other_less());
+                ASSERT_FALSE( it == l.end());
                 EXPECT_EQ( it->nKey, i.nKey );
                 EXPECT_EQ( it->nVal, i.nVal );
-                check_ordered( it, l.end() );
+                check_ordered( it, l.end());
 
             }
             ASSERT_CONTAINER_SIZE( l, nSize );
@@ -338,13 +338,13 @@ namespace cds_test {
                 EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 6 );
             }
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // update existing test
             for ( auto& i : arr2 ) {
                 EXPECT_EQ( i.s.nUpdateExistsCall, 0 );
-                std::pair<bool, bool> ret = l.update( i, update_functor() );
+                std::pair<bool, bool> ret = l.update( i, update_functor());
                 EXPECT_TRUE( ret.first );
                 EXPECT_FALSE( ret.second );
                 EXPECT_EQ( i.s.nUpdateExistsCall, 1 );
@@ -353,7 +353,7 @@ namespace cds_test {
             // update with the same value must be empty - no functor is called
             for ( auto& i : arr2 ) {
                 EXPECT_EQ( i.s.nUpdateExistsCall, 1 );
-                std::pair<bool, bool> ret = l.update( i, update_functor() );
+                std::pair<bool, bool> ret = l.update( i, update_functor());
                 EXPECT_TRUE( ret.first );
                 EXPECT_FALSE( ret.second );
                 EXPECT_EQ( i.s.nUpdateExistsCall, 1 );
@@ -379,11 +379,11 @@ namespace cds_test {
                 if ( i.nKey & 1 )
                     EXPECT_TRUE( l.erase( i.nKey ));
                 else
-                    EXPECT_TRUE( l.erase_with( other_item( i.nKey ), other_less() ));
+                    EXPECT_TRUE( l.erase_with( other_item( i.nKey ), other_less()));
 
                 EXPECT_FALSE( l.contains( i ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -407,7 +407,7 @@ namespace cds_test {
                 EXPECT_TRUE( ret.second );
                 EXPECT_EQ( i.s.nUpdateNewCall, updateNewCall + 1 );
             }
-            EXPECT_FALSE( l.empty() );
+            EXPECT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             for ( auto const& i : arr ) {
@@ -423,7 +423,7 @@ namespace cds_test {
                 EXPECT_EQ( i.s.nEraseCall, 1 );
                 EXPECT_FALSE( l.contains( i.nKey ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -436,12 +436,12 @@ namespace cds_test {
             for ( auto& i : arr )
                 EXPECT_TRUE( l.insert( i ));
 
-            EXPECT_FALSE( l.empty() );
+            EXPECT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -453,24 +453,24 @@ namespace cds_test {
 
             // unlink test
             for ( auto& i : arr )
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
             for ( auto& i : arr ) {
                 value_type val( i );
                 EXPECT_TRUE( l.contains( val ));
                 EXPECT_FALSE( l.unlink( val ));
-                EXPECT_TRUE( l.contains( val ) );
+                EXPECT_TRUE( l.contains( val ));
                 EXPECT_TRUE( l.unlink( i ));
                 EXPECT_FALSE( l.unlink( i ));
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 5 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
 
             // Iterators on empty list
@@ -509,11 +509,11 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
 
             int key = 0;
             for ( auto it = l.begin(); it != l.end(); ++it ) {
@@ -533,7 +533,7 @@ namespace cds_test {
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
         }