aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_runqueue.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-04-14 16:44:10 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-04-14 16:44:10 -0700
commitbebb89acfaffe68a48585e4724de20dfab3a92d6 (patch)
tree4a97646334165f383e8b84a4e8ad74b834596b46 /unsupported/test/cxx11_runqueue.cpp
parent9c064b5a97f9504b573991963f3ed1fbbcf33eac (diff)
Enabled the new threadpool tests
Diffstat (limited to 'unsupported/test/cxx11_runqueue.cpp')
-rw-r--r--unsupported/test/cxx11_runqueue.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/test/cxx11_runqueue.cpp b/unsupported/test/cxx11_runqueue.cpp
index 5a0a13103..f1217a01b 100644
--- a/unsupported/test/cxx11_runqueue.cpp
+++ b/unsupported/test/cxx11_runqueue.cpp
@@ -8,11 +8,11 @@
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#define EIGEN_USE_THREADS
#include "main.h"
-
#include <Eigen/CXX11/ThreadPool>
-static void test_basic_runqueue()
+void test_basic_runqueue()
{
RunQueue<int, 4> q;
// Check empty state.
@@ -96,7 +96,7 @@ static void test_basic_runqueue()
// 1 element (either front or back at random). So queue always contains at least
// 1 element, but otherwise changes chaotically. Another thread constantly tests
// that the queue is not claimed to be empty.
-static void test_empty_runqueue()
+void test_empty_runqueue()
{
RunQueue<int, 4> q;
q.PushFront(1);
@@ -136,7 +136,7 @@ static void test_empty_runqueue()
// Stress is a chaotic random test.
// One thread (owner) calls PushFront/PopFront, other threads call PushBack/
// PopBack. Ensure that we don't crash, deadlock, and all sanity checks pass.
-static void test_stress_runqueue()
+void test_stress_runqueue()
{
const int kEvents = 1 << 18;
RunQueue<int, 8> q;