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
a8894382
Commit
a8894382
authored
Jun 25, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement aout unit test w/o advanced match case
parent
e793c81e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
libcaf_core/test/aout.cpp
libcaf_core/test/aout.cpp
+10
-11
No files found.
libcaf_core/test/aout.cpp
View file @
a8894382
...
@@ -82,23 +82,22 @@ CAF_TEST(global_and_local_redirect) {
...
@@ -82,23 +82,22 @@ CAF_TEST(global_and_local_redirect) {
actor_ostream
::
redirect_all
(
global_redirect
);
actor_ostream
::
redirect_all
(
global_redirect
);
spawn
(
chatty_actor
);
spawn
(
chatty_actor
);
spawn
(
chattier_actor
,
local_redirect
);
spawn
(
chattier_actor
,
local_redirect
);
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>>
expected
{
{
":test"
,
chatty_line
},
{
":test"
,
chatty_line
},
{
":test2"
,
chattier_line
}
};
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>>
lines
;
int
i
=
0
;
int
i
=
0
;
self
->
receive_for
(
i
,
2
)(
self
->
receive_for
(
i
,
3
)(
on
(
global_redirect
,
arg_match
)
>>
[](
std
::
string
&
line
)
{
[
&
](
std
::
string
&
virtual_file
,
std
::
string
&
line
)
{
// drop trailing '\n'
// drop trailing '\n'
if
(
!
line
.
empty
())
if
(
!
line
.
empty
())
line
.
pop_back
();
line
.
pop_back
();
CAF_CHECK_EQUAL
(
line
,
chatty_line
);
lines
.
emplace_back
(
std
::
move
(
virtual_file
),
std
::
move
(
line
));
}
);
self
->
receive
(
on
(
local_redirect
,
arg_match
)
>>
[](
std
::
string
&
line
)
{
// drop trailing '\n'
if
(
!
line
.
empty
())
line
.
pop_back
();
CAF_CHECK_EQUAL
(
line
,
chattier_line
);
}
}
);
);
CAF_CHECK
(
std
::
is_permutation
(
lines
.
begin
(),
lines
.
end
(),
expected
.
begin
()));
self
->
await_all_other_actors_done
();
self
->
await_all_other_actors_done
();
CAF_CHECK_EQUAL
(
self
->
mailbox
().
count
(),
0
);
CAF_CHECK_EQUAL
(
self
->
mailbox
().
count
(),
0
);
}
}
...
...
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