Uses different pass count for different parallel queue test cases
[libcds.git] / test / unit / misc / cxx11_atomic_class.cpp
index 1f99d513314a19b1d055f40c1cdf42734b3fba9c..4041d8f70a0ae595b9625610871119049dca0d3b 100644 (file)
@@ -32,7 +32,7 @@
 #include <cds/algo/atomic.h>
 #include "cxx11_convert_memory_order.h"
 
-#define EXPECT_ATOMIC_IS_LOCK_FREE( x ) EXPECT_TRUE( x.is_lock_free() )
+#define EXPECT_ATOMIC_IS_LOCK_FREE( x ) EXPECT_TRUE( x.is_lock_free())
 
 namespace {
     class cxx11_atomic_class: public ::testing::Test
@@ -526,14 +526,14 @@ namespace {
             EXPECT_EQ( *a.load( oLoad ), 1 );
 
             for ( integral_type i = 1; i < aSize; ++i ) {
-                integral_type * p = a.load();
+                p = a.load();
                 EXPECT_EQ( *p, i );
                 EXPECT_EQ( a.fetch_add( 1, order ), p );
                 EXPECT_EQ( *a.load( oLoad ), i + 1 );
             }
 
             for ( integral_type i = aSize; i > 1; --i ) {
-                integral_type * p = a.load();
+                p = a.load();
                 EXPECT_EQ( *p, i  );
                 EXPECT_EQ( a.fetch_sub( 1, order ), p );
                 EXPECT_EQ( *a.load( oLoad ), i - 1 );
@@ -578,7 +578,7 @@ namespace {
             EXPECT_EQ( *a.load(), 1 );
 
             for ( integral_type i = 1; i < aSize; ++i ) {
-                integral_type * p = a.load();
+                p = a.load();
                 EXPECT_EQ( *p, i );
                 integral_type * pa = a.fetch_add( 1 );
                 EXPECT_EQ( pa, p );
@@ -586,7 +586,7 @@ namespace {
             }
 
             for ( integral_type i = aSize; i > 1; --i ) {
-                integral_type * p = a.load();
+                p = a.load();
                 EXPECT_EQ( *p, i  );
                 EXPECT_EQ( a.fetch_sub( 1 ), p );
                 EXPECT_EQ( *a.load(), i - 1 );