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
bf851f98
authored
Apr 15, 2015
by
Tobias Fuchs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
containers_cpp: fix in unit tests of LlxScx
parent
4a244a07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
containers_cpp/test/llx_scx_test.cc
+3
-3
No files found.
containers_cpp/test/llx_scx_test.cc
View file @
bf851f98
...
@@ -64,7 +64,7 @@ void LlxScxTest::ParallelTest() {
...
@@ -64,7 +64,7 @@ void LlxScxTest::ParallelTest() {
if
(
return_val
!=
EMBB_SUCCESS
)
if
(
return_val
!=
EMBB_SUCCESS
)
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"Could not get thread id!"
);
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"Could not get thread id!"
);
// Threads try to append n nodes to a linked list in parallel
// Threads try to append n nodes to a linked list in parallel
for
(
char
value
=
'a'
;
value
<=
'
z
'
;)
{
for
(
char
value
=
'a'
;
value
<=
'
p
'
;)
{
// Find node to append new element on:
// Find node to append new element on:
internal
::
LlxScxRecord
<
Node
>
*
node
=
&
head_llx
;
internal
::
LlxScxRecord
<
Node
>
*
node
=
&
head_llx
;
internal
::
LlxScxRecord
<
Node
>
*
next
=
node
->
Data
().
next_
;
internal
::
LlxScxRecord
<
Node
>
*
next
=
node
->
Data
().
next_
;
...
@@ -84,7 +84,7 @@ void LlxScxTest::ParallelTest() {
...
@@ -84,7 +84,7 @@ void LlxScxTest::ParallelTest() {
internal
::
FixedSizeList
<
LlxScxRecord
<
Node
>
*>
finalize_deps
(
0
);
internal
::
FixedSizeList
<
LlxScxRecord
<
Node
>
*>
finalize_deps
(
0
);
linked_deps
.
PushBack
(
node
);
linked_deps
.
PushBack
(
node
);
// Create new node:
// Create new node:
Node
new_node
(
static_cast
<
int
>
(
thread_index
),
value
);
Node
new_node
(
static_cast
<
int
>
(
thread_index
),
value
,
next
);
internal
::
LlxScxRecord
<
Node
>
*
new_node_ptr
=
internal
::
LlxScxRecord
<
Node
>
*
new_node_ptr
=
new
internal
::
LlxScxRecord
<
Node
>
(
new_node
);
new
internal
::
LlxScxRecord
<
Node
>
(
new_node
);
// Convert node pointer to size_t:
// Convert node pointer to size_t:
...
@@ -119,7 +119,7 @@ void LlxScxTest::ParallelTestPost() {
...
@@ -119,7 +119,7 @@ void LlxScxTest::ParallelTestPost() {
node
=
next
;
node
=
next
;
next
=
next
->
Data
().
next_
;
next
=
next
->
Data
().
next_
;
}
}
PT_ASSERT_EQ_MSG
(
static_cast
<
size_t
>
(
2
6
*
num_threads_
),
values
.
size
(),
PT_ASSERT_EQ_MSG
(
static_cast
<
size_t
>
(
1
6
*
num_threads_
),
values
.
size
(),
"Unexpected size of result list"
);
"Unexpected size of result list"
);
}
}
...
...
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