From ce2cf1faa7b91acffc43b615a2fd87254cf86851 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 25 Mar 2015 13:33:16 +0100 Subject: [PATCH] tasks_cpp: removed code that was commented out in the tests --- tasks_cpp/test/tasks_cpp_test_group.cc | 12 ++---------- tasks_cpp/test/tasks_cpp_test_queue.cc | 6 +----- tasks_cpp/test/tasks_cpp_test_task.cc | 9 --------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/tasks_cpp/test/tasks_cpp_test_group.cc b/tasks_cpp/test/tasks_cpp_test_group.cc index 6173e90..2e12fae 100644 --- a/tasks_cpp/test/tasks_cpp_test_group.cc +++ b/tasks_cpp/test/tasks_cpp_test_group.cc @@ -39,8 +39,7 @@ struct result_example_struct { typedef struct result_example_struct result_example_t; static void testGroupAction(embb::tasks::TaskContext & /*context*/) { - //std::cout << "testGroupAction on core " << - // context.GetCurrentCoreNumber() << std::endl; + // emtpy } static void testDoSomethingElse() { @@ -51,24 +50,18 @@ GroupTest::GroupTest() { } void GroupTest::TestBasic() { - //std::cout << "running testGroup..." << std::endl; - embb::tasks::Node::Initialize(THIS_DOMAIN_ID, THIS_NODE_ID); embb::tasks::Node & node = embb::tasks::Node::GetInstance(); embb::tasks::Group & group = node.CreateGroup(); embb::tasks::Task task; - //std::cout << "wait all..." << std::endl; - for (int ii = 0; ii < 4; ii++) { task = group.Spawn(testGroupAction); } testDoSomethingElse(); group.WaitAll(MTAPI_INFINITE); - //std::cout << "wait any..." << std::endl; - for (int ii = 0; ii < 4; ii++) { task = group.Spawn(mtapi_task_id_t(ii + 1), testGroupAction); } @@ -76,7 +69,7 @@ void GroupTest::TestBasic() { mtapi_status_t status; mtapi_task_id_t result; while (MTAPI_SUCCESS == (status = group.WaitAny(MTAPI_INFINITE, result))) { - //std::cout << "got a result from task " << result << std::endl; + // empty } node.DestroyGroup(group); @@ -84,5 +77,4 @@ void GroupTest::TestBasic() { embb::tasks::Node::Finalize(); PT_EXPECT_EQ(embb_get_bytes_allocated(), 0u); - //std::cout << "...done" << std::endl << std::endl; } diff --git a/tasks_cpp/test/tasks_cpp_test_queue.cc b/tasks_cpp/test/tasks_cpp_test_queue.cc index 2867c6a..17514ca 100644 --- a/tasks_cpp/test/tasks_cpp_test_queue.cc +++ b/tasks_cpp/test/tasks_cpp_test_queue.cc @@ -36,8 +36,7 @@ #define QUEUE_TEST_ID 17 static void testQueueAction(embb::tasks::TaskContext & /*context*/) { - //std::cout << "testQueueAction on core " << - // context.GetCurrentCoreNumber() << std::endl; + // empty } static void testDoSomethingElse() { @@ -48,8 +47,6 @@ QueueTest::QueueTest() { } void QueueTest::TestBasic() { - //std::cout << "running testQueue..." << std::endl; - embb::tasks::Node::Initialize(THIS_DOMAIN_ID, THIS_NODE_ID); embb::tasks::Node & node = embb::tasks::Node::GetInstance(); @@ -66,5 +63,4 @@ void QueueTest::TestBasic() { embb::tasks::Node::Finalize(); PT_EXPECT_EQ(embb_get_bytes_allocated(), 0u); - //std::cout << "...done" << std::endl << std::endl; } diff --git a/tasks_cpp/test/tasks_cpp_test_task.cc b/tasks_cpp/test/tasks_cpp_test_task.cc index deb01ce..103098d 100644 --- a/tasks_cpp/test/tasks_cpp_test_task.cc +++ b/tasks_cpp/test/tasks_cpp_test_task.cc @@ -40,8 +40,6 @@ static void testTaskAction( char const * msg, std::string * output, embb::tasks::TaskContext & /*context*/) { - //std::cout << "testTaskAction " << msg << " on core " << - // context.GetCurrentCoreNumber() << std::endl; *output = msg; } @@ -71,8 +69,6 @@ TaskTest::TaskTest() { } void TaskTest::TestBasic() { - //std::cout << "running testTask..." << std::endl; - embb::tasks::Node::Initialize(THIS_DOMAIN_ID, THIS_NODE_ID); embb::tasks::Node & node = embb::tasks::Node::GetInstance(); @@ -96,7 +92,6 @@ void TaskTest::TestBasic() { testDoSomethingElse(); task.Wait(MTAPI_INFINITE); PT_EXPECT(test == "simple"); - //std::cout << "result: " << test.c_str() << std::endl; std::string test1, test2, test3; task = node.First( @@ -112,9 +107,6 @@ void TaskTest::TestBasic() { PT_EXPECT(test1 == "first"); PT_EXPECT(test2 == "second"); PT_EXPECT(test3 == "third"); - //std::cout << "result1: " << test1.c_str() << std::endl; - //std::cout << "result2: " << test2.c_str() << std::endl; - //std::cout << "result3: " << test3.c_str() << std::endl; int value = 0; task = node.Spawn( @@ -132,5 +124,4 @@ void TaskTest::TestBasic() { embb::tasks::Node::Finalize(); PT_EXPECT(embb_get_bytes_allocated() == 0); - //std::cout << "...done" << std::endl << std::endl; } -- libgit2 0.26.0