Uses different pass count for different parallel queue test cases
[libcds.git] / test / stress / sequential / test.cpp
index f999c9e..a632e17 100644 (file)
@@ -33,7 +33,9 @@
 */
 
 #include "../misc/common.h"
+#include "../stack/stack_type.h"
 #include <cds/sync/spinlock.h>
+#include <cds/misc/RigtorpSPSCQueue.h>
 
 namespace {
 
@@ -41,12 +43,28 @@ class sequential_test : public cds_test::stress_fixture {
 
 };
 
+atomics::atomic<int> x;
+atomics::atomic<int> y;
+typedef cds::sync::spin SpinLock;
+SpinLock l;
+
+struct value_type {
+  size_t num;
+};
+
+typedef stack::Types<value_type>::Treiber_HP stack_type;
+stack_type stack;
+rigtorp::SPSCQueue<size_t> q(10);
+
 TEST_F(sequential_test, TEST) {
-  typedef cds::sync::spin SpinLock;
-  SpinLock l;
-  l.lock();
-  std::cout << "TEST\n";
-  l.unlock();
+//  l.lock();
+//  l.unlock();
+//  y.store(1, atomics::memory_order_relaxed);
+//  value_type v = {1};
+//  stack.push(v);
+//  stack.pop(v);
+
+  q.push(1);
 }
 
 } // namespace