Updated copyright
[libcds.git] / test / unit / tree / test_tree_map_hp.h
index 831d0cd748c4b0e7d6fae3fe8a84dc0ee492d451..73b7f01dd817b4891a9fda6e9c05f9cce6c7603f 100644 (file)
@@ -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_TREE_TEST_TREE_MAP_HP_H
@@ -51,7 +51,6 @@ namespace cds_test {
             ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
-            typedef typename Map::value_type map_pair;
             size_t const kkSize = base_class::kSize;
 
             std::vector<key_type> arrKeys;
@@ -68,8 +67,8 @@ namespace cds_test {
             }
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             // get/extract
@@ -116,7 +115,7 @@ namespace cds_test {
                 gp = m.get_with( other_item( i.nKey ), other_less());
                 ASSERT_TRUE( !gp );
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             gp = m.extract_min();
@@ -125,40 +124,40 @@ namespace cds_test {
             EXPECT_TRUE( !gp );
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             // extract_min
             int nKey = -1;
             size_t nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 gp = m.extract_min();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->first.nKey, nKey + 1 );
                 nKey = gp->first.nKey;
                 ++nCount;
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             EXPECT_EQ( nCount, kkSize );
 
             // extract_max
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             nKey = kkSize;
             nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 gp = m.extract_max();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->first.nKey, nKey - 1 );
                 nKey = gp->first.nKey;
                 ++nCount;
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             EXPECT_EQ( nCount, kkSize );