Adds a fake test case
authorPeizhao Ou <peizhaoo@uci.edu>
Mon, 29 Jan 2018 21:51:51 +0000 (13:51 -0800)
committerPeizhao Ou <peizhaoo@uci.edu>
Mon, 29 Jan 2018 21:51:51 +0000 (13:51 -0800)
test/stress/sequential/CMakeLists.txt
test/stress/sequential/test.cpp [new file with mode: 0644]

index 39ca90f754ae84d7cd381d8630eff9682f04b1eb..7ef8daddbfe488a137b8acd0e84e0f72160431b4 100644 (file)
@@ -19,6 +19,9 @@ include_directories(
 add_executable(${PACKAGE_NAME} ${CDSSTRESS_STACK_SOURCES})
 target_link_libraries(${PACKAGE_NAME} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
 
+add_executable(mytest test.cpp ../main.cpp)
+target_link_libraries(mytest ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
+
 add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
 
 add_custom_target( stress-sequential-all
diff --git a/test/stress/sequential/test.cpp b/test/stress/sequential/test.cpp
new file mode 100644 (file)
index 0000000..f999c9e
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+    This file is a part of libcds - Concurrent Data Structures library
+
+    (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:
+
+    * Redistributions of source code must retain the above copyright notice,
+   this
+    list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+    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.
+*/
+
+#include "../misc/common.h"
+#include <cds/sync/spinlock.h>
+
+namespace {
+
+class sequential_test : public cds_test::stress_fixture {
+
+};
+
+TEST_F(sequential_test, TEST) {
+  typedef cds::sync::spin SpinLock;
+  SpinLock l;
+  l.lock();
+  std::cout << "TEST\n";
+  l.unlock();
+}
+
+} // namespace