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
b8ed1894
Commit
b8ed1894
authored
Jun 09, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use extract_opts in typed_remote_actor unit test
parent
b35cb033
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
libcaf_io/test/typed_remote_actor.cpp
libcaf_io/test/typed_remote_actor.cpp
+15
-8
No files found.
libcaf_io/test/typed_remote_actor.cpp
View file @
b8ed1894
...
@@ -100,15 +100,22 @@ CAF_TEST(test_typed_remote_actor) {
...
@@ -100,15 +100,22 @@ CAF_TEST(test_typed_remote_actor) {
announce
<
ping
>
(
"ping"
,
&
ping
::
value
);
announce
<
ping
>
(
"ping"
,
&
ping
::
value
);
announce
<
pong
>
(
"pong"
,
&
pong
::
value
);
announce
<
pong
>
(
"pong"
,
&
pong
::
value
);
if
(
argv
)
{
if
(
argv
)
{
message_builder
{
argv
,
argv
+
argc
}.
apply
({
uint16_t
port
=
0
;
on
(
"-c"
,
spro
<
uint16_t
>
)
>>
[](
uint16_t
port
)
{
auto
r
=
message_builder
(
argv
,
argv
+
argc
).
extract_opts
({
{
"client-port,c"
,
"set port for client"
,
port
},
{
"server,s"
,
"run in server mode"
}
});
if
(
!
r
.
error
.
empty
()
||
r
.
opts
.
count
(
"help"
)
>
0
||
!
r
.
remainder
.
empty
())
{
cout
<<
r
.
error
<<
endl
<<
endl
<<
r
.
helptext
<<
endl
;
return
;
}
if
(
r
.
opts
.
count
(
"client-port"
)
>
0
)
{
CAF_MESSAGE
(
"run in client mode"
);
CAF_MESSAGE
(
"run in client mode"
);
run_client
(
"localhost"
,
port
);
run_client
(
"localhost"
,
port
);
},
}
else
{
on
(
"-s"
)
>>
[]
{
CAF_MESSAGE
(
"run in server mode"
);
run_server
();
run_server
();
}
}
});
}
}
else
{
else
{
auto
port
=
run_server
();
auto
port
=
run_server
();
...
...
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