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
a2660f28
Commit
a2660f28
authored
Jan 09, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix formatting
parent
00ddd026
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
166 deletions
+92
-166
libcaf_core/test/actor_lifetime.cpp
libcaf_core/test/actor_lifetime.cpp
+4
-8
libcaf_core/test/actor_pool.cpp
libcaf_core/test/actor_pool.cpp
+2
-2
libcaf_core/test/dynamic_spawn.cpp
libcaf_core/test/dynamic_spawn.cpp
+86
-156
No files found.
libcaf_core/test/actor_lifetime.cpp
View file @
a2660f28
...
...
@@ -21,9 +21,9 @@
#define CAF_SUITE actor_lifetime
#include "caf/test/unit_test.hpp"
#include <mutex>
#include <atomic>
#include <condition_variable>
#include <mutex>
#include "caf/all.hpp"
...
...
@@ -62,9 +62,7 @@ public:
behavior
make_behavior
()
override
{
return
{
[
=
](
int
x
)
{
return
x
;
}
[
=
](
int
x
)
{
return
x
;
},
};
}
};
...
...
@@ -108,12 +106,10 @@ behavior tester(event_based_actor* self, const actor& aut) {
CAF_CHECK_EQUAL
(
s_testees
.
load
(),
0
);
CAF_CHECK_EQUAL
(
s_pending_on_exits
.
load
(),
0
);
self
->
quit
();
}
}
,
};
}
struct
config
:
actor_system_config
{
config
()
{
set
(
"scheduler.policy"
,
"testing"
);
...
...
@@ -163,7 +159,7 @@ struct fixture {
}
// Run the exit_msg.
sched
.
run_once
();
//expect((exit_msg), from(tst_driver).to(tst_subject));
//
expect((exit_msg), from(tst_driver).to(tst_subject));
{
// Resume driver.
std
::
unique_lock
<
std
::
mutex
>
guard
{
s_mtx
};
s_testee_cleanup_done
=
true
;
...
...
libcaf_core/test/actor_pool.cpp
View file @
a2660f28
...
...
@@ -86,8 +86,8 @@ CAF_TEST_FIXTURE_SCOPE(actor_pool_tests, fixture)
CAF_TEST
(
round_robin_actor_pool
)
{
scoped_actor
self
{
system
};
auto
pool
=
actor_pool
::
make
(
&
context
,
5
,
spawn_worker
,
actor_pool
::
round_robin
());
auto
pool
=
actor_pool
::
make
(
&
context
,
5
,
spawn_worker
,
actor_pool
::
round_robin
());
self
->
send
(
pool
,
sys_atom_v
,
put_atom_v
,
spawn_worker
());
std
::
vector
<
actor
>
workers
;
for
(
int
i
=
0
;
i
<
6
;
++
i
)
{
...
...
libcaf_core/test/dynamic_spawn.cpp
View file @
a2660f28
This diff is collapsed.
Click to expand it.
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