Removed redundant spaces
[libcds.git] / test / unit / queue / test_intrusive_bounded_queue.h
index 3c445f8f98400e9fd0d8d286595df6cf19d8de9d..a5bb70732fe6967c5c337e9d426638edd90bf92b 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_QUEUE_TEST_INTRUSIVE_BOUNDED_QUEUE_H
 
 #include <cds_test/check_size.h>
 #include <vector>
-\r
-namespace cds_test {\r
-\r
-    class intrusive_bounded_queue : public ::testing::Test\r
-    {\r
-    protected:\r
+
+namespace cds_test {
+
+    class intrusive_bounded_queue : public ::testing::Test
+    {
+    protected:
         struct item {
             int nVal;
             int nDisposeCount;
@@ -47,17 +47,17 @@ namespace cds_test {
                 : nDisposeCount( 0 )
             {}
         };
-\r
-    protected:\r
-        template <typename Queue>\r
-        void test( Queue& q )\r
-        {\r
+
+    protected:
+        template <typename Queue>
+        void test( Queue& q )
+        {
             typedef typename Queue::value_type value_type;
             value_type it;
 
             const size_t nSize = q.capacity();
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             std::vector< value_type > arr;
@@ -74,14 +74,14 @@ namespace cds_test {
                     ASSERT_TRUE( q.enqueue( i ));
                 }
                 ASSERT_CONTAINER_SIZE( q, i.nVal + 1 );
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
             }
 
-            ASSERT_CONTAINER_SIZE( q, q.capacity() );
+            ASSERT_CONTAINER_SIZE( q, q.capacity());
 
             // pop
             int val = 0;
-            while ( !q.empty() ) {
+            while ( !q.empty()) {
                 value_type * v;
                 if ( val & 1 )
                     v = q.pop();
@@ -95,25 +95,25 @@ namespace cds_test {
             }
             ASSERT_EQ( val, static_cast<int>( nSize ));
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // pop from empty queue
             {
                 value_type * v = q.pop();
                 ASSERT_TRUE( v == nullptr );
-                ASSERT_TRUE( q.empty() );
+                ASSERT_TRUE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, 0 );
             }
 
             // clear
             for ( auto& i : arr ) {
-                ASSERT_TRUE( q.push( i ) );
+                ASSERT_TRUE( q.push( i ));
             }
-            ASSERT_FALSE( q.empty() );
-            ASSERT_CONTAINER_SIZE( q, q.capacity() );
+            ASSERT_FALSE( q.empty());
+            ASSERT_CONTAINER_SIZE( q, q.capacity());
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             if ( std::is_same<typename Queue::disposer, cds::intrusive::opt::v::empty_disposer>::value ) {
@@ -131,21 +131,21 @@ namespace cds_test {
 
             // clear with disposer
             for ( auto& i : arr ) {
-                ASSERT_TRUE( q.push( i ) );
+                ASSERT_TRUE( q.push( i ));
                 i.nDisposeCount = 0;
             }
-            ASSERT_FALSE( q.empty() );
-            ASSERT_CONTAINER_SIZE( q, q.capacity() );
+            ASSERT_FALSE( q.empty());
+            ASSERT_CONTAINER_SIZE( q, q.capacity());
             q.clear( []( value_type * p ) { p->nDisposeCount = p->nVal + 1; } );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
             // check the disposer has not been called
             for ( auto& i : arr ) {
                 ASSERT_EQ( i.nDisposeCount, i.nVal + 1 );
             }
-        }\r
-    };\r
-\r
-} // namespace cds_test\r
+        }
+    };
+
+} // namespace cds_test
 
 #endif // CDSUNIT_QUEUE_TEST_INTRUSIVE_BOUNDED_QUEUE_H