From 7a3612883cb8dbcd56d367700dd0933356305aef Mon Sep 17 00:00:00 2001 From: Winter Date: Sat, 30 Jan 2016 12:21:27 +0100 Subject: [PATCH] dataflow_cpp: fixed test to represent the correct semantics of source processes --- dataflow_cpp/test/dataflow_cpp_test_simple.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dataflow_cpp/test/dataflow_cpp_test_simple.cc b/dataflow_cpp/test/dataflow_cpp_test_simple.cc index b434625..82dfaee 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_simple.cc +++ b/dataflow_cpp/test/dataflow_cpp_test_simple.cc @@ -56,12 +56,19 @@ embb::base::Atomic source_counter; int source_array[TEST_COUNT]; bool sourceFunc(int & out) { - out = source_counter; + if (source_counter < TEST_COUNT) + { + out = source_counter; - source_array[source_counter] = out; - source_counter++; + source_array[source_counter] = out; + source_counter++; - return source_counter < TEST_COUNT; + return true; + } + else + { + return false; + } } embb::base::Atomic pred_counter; -- libgit2 0.26.0