Refactors sequential misc test cases
[libcds.git] / test / stress / sequential / test.cpp
index f999c9ed85c2198715dd389810d9817e335f58f7..a632e17a21eb0223ca53a4662e6c47e8fbfdf0ec 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