Removed redundant spaces
[libcds.git] / test / unit / map / test_map_nogc.h
index cc8abb93135dbc1f8eceb042bd618b367afbfafa..ddf12bfaf99449c262fe5dc229b9c2e89ebf1326 100644 (file)
@@ -5,7 +5,7 @@
 
     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_MAP_TEST_MAP_NOGC_H
@@ -55,7 +55,6 @@ namespace cds_test {
 
             typedef typename Map::value_type map_pair;
             typedef typename Map::iterator   iterator;
-            typedef typename Map::const_iterator const_iterator;
             size_t const kkSize = kSize;
 
             std::vector<key_type> arrKeys;
@@ -91,31 +90,31 @@ namespace cds_test {
                     break;
                 case 1:
                     it = m.insert( i.nKey );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( i.nKey ) == m.end());
                     it->second.nVal = it->first.nKey;
                     it->second.strVal = std::to_string( it->first.nKey );
                     break;
                 case 2:
                     it = m.insert( std::to_string( i.nKey ));
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( std::to_string( i.nKey )) == m.end());
                     it->second.nVal = it->first.nKey;
                     it->second.strVal = std::to_string( it->first.nKey );
                     break;
                 case 3:
                     it = m.insert( i, val );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( i, val ) == m.end());
                     break;
                 case 4:
                     it = m.insert( i.nKey, val.strVal );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( i.nKey, val.strVal ) == m.end());
                     break;
                 case 5:
                     it = m.insert( val.strVal, i.nKey );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( val.strVal, i.nKey ) == m.end());
                     break;
                 case 6:
@@ -123,8 +122,8 @@ namespace cds_test {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
                     } );
-                    ASSERT_FALSE( it == m.end() );
-                    ASSERT_TRUE( m.insert_with( i, []( map_pair& ) {
+                    ASSERT_FALSE( it == m.end());
+                    ASSERT_TRUE( m.insert_with( i, []( map_pair& ) {
                         EXPECT_TRUE( false );
                     } ) == m.end());
                     break;
@@ -133,8 +132,8 @@ namespace cds_test {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
                     } );
-                    ASSERT_FALSE( it == m.end() );
-                    ASSERT_TRUE( m.insert_with( i.nKey, []( map_pair& ) {
+                    ASSERT_FALSE( it == m.end());
+                    ASSERT_TRUE( m.insert_with( i.nKey, []( map_pair& ) {
                         EXPECT_TRUE( false );
                     } ) == m.end());
                     break;
@@ -143,14 +142,14 @@ namespace cds_test {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
                     } );
-                    ASSERT_FALSE( it == m.end() );
-                    ASSERT_TRUE( m.insert_with( val.strVal, []( map_pair& ) {
+                    ASSERT_FALSE( it == m.end());
+                    ASSERT_TRUE( m.insert_with( val.strVal, []( map_pair& ) {
                         EXPECT_TRUE( false );
                     } ) == m.end());
                     break;
                 case 9:
                     updResult = m.update( i.nKey, false );
-                    ASSERT_TRUE( updResult.first == m.end() );
+                    ASSERT_TRUE( updResult.first == m.end());
                     ASSERT_FALSE( updResult.second );
 
                     updResult = m.update( i.nKey );
@@ -159,14 +158,14 @@ namespace cds_test {
                     updResult.first->second.nVal = updResult.first->first.nKey;
 
                     updResult = m.update( i.nKey, false );
-                    ASSERT_TRUE( updResult.first != m.end() );
+                    ASSERT_TRUE( updResult.first != m.end());
                     ASSERT_FALSE( updResult.second );
                     EXPECT_EQ( updResult.first->first.nKey, updResult.first->second.nVal );
                     updResult.first->second.strVal = std::to_string( updResult.first->second.nVal );
                     break;
                 case 10:
                     updResult = m.update( i, false );
-                    ASSERT_TRUE( updResult.first == m.end() );
+                    ASSERT_TRUE( updResult.first == m.end());
                     ASSERT_FALSE( updResult.second );
 
                     updResult = m.update( i );
@@ -205,14 +204,14 @@ namespace cds_test {
                     break;
                 case 13:
                     it = m.emplace( i, i.nKey );
-                    ASSERT_TRUE( it != m.end() );
+                    ASSERT_TRUE( it != m.end());
                     ASSERT_FALSE( m.emplace( i, i.nKey ) != m.end());
                     break;
                 case 14:
                     {
                         std::string str = val.strVal;
                         it = m.emplace( i, std::move( str ));
-                        ASSERT_TRUE( it != m.end() );
+                        ASSERT_TRUE( it != m.end());
                         ASSERT_TRUE( str.empty());
                         str = val.strVal;
                         ASSERT_FALSE( m.emplace( i, std::move( str )) != m.end());
@@ -223,7 +222,7 @@ namespace cds_test {
                     {
                         std::string str = val.strVal;
                         it = m.emplace( i, i.nKey, std::move( str ));
-                        ASSERT_TRUE( it != m.end() );
+                        ASSERT_TRUE( it != m.end());
                         ASSERT_TRUE( str.empty());
                         str = val.strVal;
                         ASSERT_FALSE( m.emplace( i, i.nKey, std::move( str )) != m.end());
@@ -239,19 +238,19 @@ namespace cds_test {
                 EXPECT_EQ( it->first.nKey, it->second.nVal );
                 EXPECT_EQ( std::to_string( it->first.nKey ), it->second.strVal );
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
-            ASSERT_FALSE( m.begin() == m.end() );
-            ASSERT_FALSE( m.cbegin() == m.cend() );
+            ASSERT_FALSE( m.begin() == m.end());
+            ASSERT_FALSE( m.cbegin() == m.cend());
 
             // clear
 
             m.clear();
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
-            ASSERT_TRUE( m.begin() == m.end() );
-            ASSERT_TRUE( m.cbegin() == m.cend() );
+            ASSERT_TRUE( m.begin() == m.end());
+            ASSERT_TRUE( m.cbegin() == m.cend());
         }
     };