Commit ce2cf1fa by Marcus Winter

tasks_cpp: removed code that was commented out in the tests

parent ed0b89da
......@@ -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;
}
......@@ -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;
}
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment