From 8e5bc7eca1ba1433d5c5d5ea9743d1122e732255 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Fri, 10 Jan 2014 20:19:13 +0000 Subject: [PATCH] It does not make sense to test WorkStream with both empty worker and copier. Adjust the test case. git-svn-id: https://svn.dealii.org/trunk@32190 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/work_stream_04.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/base/work_stream_04.cc b/tests/base/work_stream_04.cc index c760c2c523..ebda814629 100644 --- a/tests/base/work_stream_04.cc +++ b/tests/base/work_stream_04.cc @@ -30,16 +30,34 @@ struct ScratchData {}; +void foo (const std::vector::iterator, + ScratchData&, + unsigned int&) +{ +} + +void bar (const unsigned int&) +{ +} + void test () { std::vector v; for (unsigned int i=0; i<20; ++i) v.push_back (i); + // first run with only a worker + WorkStream::run (v.begin(), v.end(), + &foo, + std_cxx1x::function(), + ScratchData(), + 0U); + + // next run with only a copier WorkStream::run (v.begin(), v.end(), std_cxx1x::function::iterator, ScratchData&,unsigned int&)>(), - std_cxx1x::function(), + &bar, ScratchData(), 0U); } -- 2.39.5