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
7d541296
Commit
7d541296
authored
Feb 02, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Count nr. of `on_exit` calls in test_remote_actor
parent
fd1e13b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
unit_testing/test_remote_actor.cpp
unit_testing/test_remote_actor.cpp
+10
-0
No files found.
unit_testing/test_remote_actor.cpp
View file @
7d541296
...
...
@@ -20,6 +20,7 @@ using namespace caf;
namespace
{
atomic
<
long
>
s_destructors_called
;
atomic
<
long
>
s_on_exit_called
;
using
string_pair
=
std
::
pair
<
std
::
string
,
std
::
string
>
;
...
...
@@ -163,6 +164,10 @@ class client : public event_based_actor {
return
spawn_ping
();
}
void
on_exit
()
{
++
s_on_exit_called
;
}
~
client
()
{
++
s_destructors_called
;
}
...
...
@@ -243,6 +248,10 @@ class server : public event_based_actor {
// nop
}
void
on_exit
()
{
++
s_on_exit_called
;
}
~
server
()
{
++
s_destructors_called
;
}
...
...
@@ -421,5 +430,6 @@ int main(int argc, char** argv) {
// we either spawn a server or a client, in both cases
// there must have been exactly one dtor called
CAF_CHECK_EQUAL
(
s_destructors_called
.
load
(),
1
);
CAF_CHECK_EQUAL
(
s_on_exit_called
.
load
(),
1
);
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