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
a61a4a67
Commit
a61a4a67
authored
Apr 16, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check string representation of actor handles
parent
66e8e0a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
libcaf_core/test/handles.cpp
libcaf_core/test/handles.cpp
+19
-4
No files found.
libcaf_core/test/handles.cpp
View file @
a61a4a67
...
...
@@ -31,13 +31,13 @@ using namespace caf;
namespace
{
// Simple interface for testee actors.
using
testee_actor
=
typed_actor
<
replies_to
<
int
>::
with
<
in
t
>>
;
// Simple int
32_t
erface for testee actors.
using
testee_actor
=
typed_actor
<
replies_to
<
int
32_t
>::
with
<
int32_
t
>>
;
// Dynamically typed testee.
behavior
dt_testee
()
{
return
{
[](
int
x
)
{
[](
int
32_t
x
)
{
return
x
*
x
;
}
};
...
...
@@ -46,7 +46,7 @@ behavior dt_testee() {
// Statically typed testee.
testee_actor
::
behavior_type
st_testee
()
{
return
{
[](
int
x
)
{
[](
int
32_t
x
)
{
return
x
*
x
;
}
};
...
...
@@ -274,5 +274,20 @@ CAF_TEST(ordering) {
CAF_CHECK_NOT_LESS
(
a2
.
st
,
a1
.
st
);
}
CAF_TEST
(
string_representation
)
{
auto
s1
=
a0
.
wh
;
auto
s2
=
a0
.
dt
;
auto
s3
=
a0
.
st
;
CAF_CHECK_EQUAL
(
s1
,
s2
);
CAF_CHECK_EQUAL
(
s2
,
s3
);
}
CAF_TEST
(
mpi_string_representation
)
{
CAF_CHECK
(
sys
.
message_types
(
a0
.
dt
).
empty
());
std
::
set
<
std
::
string
>
st_expected
{
"caf::replies_to<@i32>::with<@i32>"
};
CAF_CHECK_EQUAL
(
st_expected
,
sys
.
message_types
(
a0
.
st
));
CAF_CHECK_EQUAL
(
st_expected
,
sys
.
message_types
<
testee_actor
>
());
}
CAF_TEST_FIXTURE_SCOPE_END
()
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