Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ce2cf1fa
authored
Mar 25, 2015
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tasks_cpp: removed code that was commented out in the tests
parent
ed0b89da
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
24 deletions
+3
-24
tasks_cpp/test/tasks_cpp_test_group.cc
+2
-10
tasks_cpp/test/tasks_cpp_test_queue.cc
+1
-5
tasks_cpp/test/tasks_cpp_test_task.cc
+0
-9
No files found.
tasks_cpp/test/tasks_cpp_test_group.cc
View file @
ce2cf1fa
...
...
@@ -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;
}
tasks_cpp/test/tasks_cpp_test_queue.cc
View file @
ce2cf1fa
...
...
@@ -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;
}
tasks_cpp/test/tasks_cpp_test_task.cc
View file @
ce2cf1fa
...
...
@@ -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;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment