Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
1dfbd621
Commit
1dfbd621
authored
Feb 09, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix false positives in `test_message_lifetime`
parent
f6ca2450
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
unit_testing/test_message_lifetime.cpp
unit_testing/test_message_lifetime.cpp
+8
-3
No files found.
unit_testing/test_message_lifetime.cpp
View file @
1dfbd621
...
...
@@ -29,7 +29,7 @@ behavior testee::make_behavior() {
others
()
>>
[
=
]
{
CAF_CHECK_EQUAL
(
last_dequeued
().
cvals
()
->
get_reference_count
(),
2
);
quit
();
return
last_dequeued
(
);
return
std
::
move
(
last_dequeued
()
);
}
};
}
...
...
@@ -97,6 +97,7 @@ void test_message_lifetime_in_scoped_actor() {
CAF_CHECK_EQUAL
(
msg
.
get_as
<
int
>
(
0
),
42
);
}
template
<
spawn_options
Os
>
void
test_message_lifetime
()
{
test_message_lifetime_in_scoped_actor
();
if
(
CAF_TEST_RESULT
()
!=
0
)
{
...
...
@@ -104,13 +105,17 @@ void test_message_lifetime() {
}
// put some preassure on the scheduler (check for thread safety)
for
(
size_t
i
=
0
;
i
<
100
;
++
i
)
{
spawn
<
tester
>
(
spawn
<
testee
>
());
spawn
<
tester
>
(
spawn
<
testee
,
Os
>
());
}
}
int
main
()
{
CAF_TEST
(
test_message_lifetime
);
test_message_lifetime
();
CAF_PRINT
(
"test_message_lifetime<no_spawn_options>"
);
test_message_lifetime
<
no_spawn_options
>
();
await_all_actors_done
();
CAF_PRINT
(
"test_message_lifetime<priority_aware>"
);
test_message_lifetime
<
priority_aware
>
();
await_all_actors_done
();
shutdown
();
return
CAF_TEST_RESULT
();
...
...
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