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
7bc819ac
Commit
7bc819ac
authored
May 11, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make io_dsl fixtures more flexible
parent
30517ea5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
libcaf_io/test/remote_streams.cpp
libcaf_io/test/remote_streams.cpp
+2
-2
libcaf_test/caf/test/io_dsl.hpp
libcaf_test/caf/test/io_dsl.hpp
+14
-5
No files found.
libcaf_io/test/remote_streams.cpp
View file @
7bc819ac
...
...
@@ -103,7 +103,7 @@ public:
}
};
using
sub_fixture
=
test_node_fixture
<
remoting_config
>
;
using
sub_fixture
=
test_node_fixture
_t
<
remoting_config
>
;
}
// namespace <anonymous>
...
...
@@ -131,7 +131,7 @@ struct dsl_path_info {
} \
CAF_MESSAGE("<<< path done")
CAF_TEST_FIXTURE_SCOPE
(
netstreams
,
point_to_point_fixture
<
remoting_config
>
)
CAF_TEST_FIXTURE_SCOPE
(
netstreams
,
point_to_point_fixture
_t
<
remoting_config
>
)
CAF_TEST
(
stream_crossing_the_wire
)
{
CAF_MESSAGE
(
"earth stream serv: "
<<
to_string
(
earth
.
stream_serv
));
...
...
libcaf_test/caf/test/io_dsl.hpp
View file @
7bc819ac
...
...
@@ -27,10 +27,10 @@ namespace {
using
namespace
caf
;
using
namespace
caf
::
io
;
template
<
class
Config
=
caf
::
actor_system_config
>
class
test_node_fixture
:
public
test_coordinator_fixture
<
Config
>
{
template
<
class
BaseFixture
=
test_coordinator_fixture
<
actor_system_config
>
>
class
test_node_fixture
:
public
BaseFixture
{
public:
using
super
=
test_coordinator_fixture
<
Config
>
;
using
super
=
BaseFixture
;
middleman
&
mm
;
network
::
test_multiplexer
&
mpx
;
...
...
@@ -123,12 +123,16 @@ private:
}
};
/// Binds `test_coordinator_fixture<Config>` to `test_node_fixture`.
template
<
class
Config
=
actor_system_config
>
using
test_node_fixture_t
=
test_node_fixture
<
test_coordinator_fixture
<
Config
>>
;
/// A simple fixture that includes two nodes (`earth` and `mars`) that are
/// connected to each other.
template
<
class
Config
=
caf
::
actor_system_config
>
template
<
class
BaseFixture
=
test_coordinator_fixture
<
actor_system_config
>
>
class
point_to_point_fixture
{
public:
using
planet_type
=
test_node_fixture
<
Config
>
;
using
planet_type
=
test_node_fixture
<
BaseFixture
>
;
planet_type
earth
;
planet_type
mars
;
...
...
@@ -167,6 +171,11 @@ public:
}
};
/// Binds `test_coordinator_fixture<Config>` to `point_to_point_fixture`.
template
<
class
Config
=
actor_system_config
>
using
point_to_point_fixture_t
=
point_to_point_fixture
<
test_coordinator_fixture
<
Config
>>
;
}
// namespace <anonymous>
#define expect_on(where, types, fields) \
...
...
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