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
a7468026
Commit
a7468026
authored
May 13, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shadowing and documentation warnings
parent
425f224b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
7 deletions
+11
-7
libcaf_core/test/serialization.cpp
libcaf_core/test/serialization.cpp
+1
-1
libcaf_core/test/spawn.cpp
libcaf_core/test/spawn.cpp
+4
-0
libcaf_io/test/remote_actor.cpp
libcaf_io/test/remote_actor.cpp
+4
-4
libcaf_test/caf/test/unit_test.hpp
libcaf_test/caf/test/unit_test.hpp
+1
-2
libcaf_test/caf/test/unit_test_impl.hpp
libcaf_test/caf/test/unit_test_impl.hpp
+1
-0
No files found.
libcaf_core/test/serialization.cpp
View file @
a7468026
...
@@ -188,7 +188,7 @@ class binary_util {
...
@@ -188,7 +188,7 @@ class binary_util {
};
};
struct
is_message
{
struct
is_message
{
explicit
is_message
(
message
&
msg
)
:
msg
(
msg
)
{
explicit
is_message
(
message
&
msg
ref
)
:
msg
(
msgref
)
{
// nop
// nop
}
}
...
...
libcaf_core/test/spawn.cpp
View file @
a7468026
...
@@ -825,6 +825,8 @@ CAF_TEST(constructor_attach) {
...
@@ -825,6 +825,8 @@ CAF_TEST(constructor_attach) {
anon_send
(
spawn
<
spawner
>
(),
atom
(
"die"
));
anon_send
(
spawn
<
spawner
>
(),
atom
(
"die"
));
}
}
namespace
{
class
exception_testee
:
public
event_based_actor
{
class
exception_testee
:
public
event_based_actor
{
public:
public:
exception_testee
()
{
exception_testee
()
{
...
@@ -841,6 +843,8 @@ class exception_testee : public event_based_actor {
...
@@ -841,6 +843,8 @@ class exception_testee : public event_based_actor {
}
}
};
};
}
// namespace <anonymous>
CAF_TEST
(
custom_exception_handler
)
{
CAF_TEST
(
custom_exception_handler
)
{
auto
handler
=
[](
const
std
::
exception_ptr
&
eptr
)
->
optional
<
uint32_t
>
{
auto
handler
=
[](
const
std
::
exception_ptr
&
eptr
)
->
optional
<
uint32_t
>
{
try
{
try
{
...
...
libcaf_io/test/remote_actor.cpp
View file @
a7468026
...
@@ -56,7 +56,7 @@ constexpr size_t num_pings = 10;
...
@@ -56,7 +56,7 @@ constexpr size_t num_pings = 10;
size_t
s_pongs
=
0
;
size_t
s_pongs
=
0
;
behavior
ping_behavior
(
local_actor
*
self
,
size_t
num_pin
gs
)
{
behavior
ping_behavior
(
local_actor
*
self
,
size_t
ping_ms
gs
)
{
return
{
return
{
on
(
atom
(
"pong"
),
arg_match
)
>>
[
=
](
int
value
)
->
message
{
on
(
atom
(
"pong"
),
arg_match
)
>>
[
=
](
int
value
)
->
message
{
if
(
!
self
->
current_sender
())
{
if
(
!
self
->
current_sender
())
{
...
@@ -64,7 +64,7 @@ behavior ping_behavior(local_actor* self, size_t num_pings) {
...
@@ -64,7 +64,7 @@ behavior ping_behavior(local_actor* self, size_t num_pings) {
}
}
CAF_TEST_INFO
(
"received {'pong', "
<<
value
<<
"}"
);
CAF_TEST_INFO
(
"received {'pong', "
<<
value
<<
"}"
);
// cout << to_string(self->current_message()) << endl;
// cout << to_string(self->current_message()) << endl;
if
(
++
s_pongs
>=
num_pin
gs
)
{
if
(
++
s_pongs
>=
ping_ms
gs
)
{
CAF_TEST_INFO
(
"reached maximum, send {'EXIT', user_defined} "
CAF_TEST_INFO
(
"reached maximum, send {'EXIT', user_defined} "
<<
"to last sender and quit with normal reason"
);
<<
"to last sender and quit with normal reason"
);
self
->
send_exit
(
self
->
current_sender
(),
self
->
send_exit
(
self
->
current_sender
(),
...
@@ -94,9 +94,9 @@ size_t pongs() {
...
@@ -94,9 +94,9 @@ size_t pongs() {
return
s_pongs
;
return
s_pongs
;
}
}
void
event_based_ping
(
event_based_actor
*
self
,
size_t
num_pin
gs
)
{
void
event_based_ping
(
event_based_actor
*
self
,
size_t
ping_ms
gs
)
{
s_pongs
=
0
;
s_pongs
=
0
;
self
->
become
(
ping_behavior
(
self
,
num_pin
gs
));
self
->
become
(
ping_behavior
(
self
,
ping_ms
gs
));
}
}
void
pong
(
blocking_actor
*
self
,
actor
ping_actor
)
{
void
pong
(
blocking_actor
*
self
,
actor
ping_actor
)
{
...
...
libcaf_test/caf/test/unit_test.hpp
View file @
a7468026
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#define CAF_TEST_UNIT_TEST_HPP
#define CAF_TEST_UNIT_TEST_HPP
#include <map>
#include <map>
#include <regex>
#include <cmath>
#include <cmath>
#include <mutex>
#include <mutex>
#include <thread>
#include <thread>
...
@@ -235,7 +234,7 @@ class engine {
...
@@ -235,7 +234,7 @@ class engine {
/**
/**
* Adds a test to the engine.
* Adds a test to the engine.
* @param name The name of the suite.
* @param name The name of the suite.
* @param
t
The test to register.
* @param
ptr
The test to register.
*/
*/
static
void
add
(
const
char
*
name
,
std
::
unique_ptr
<
test
>
ptr
);
static
void
add
(
const
char
*
name
,
std
::
unique_ptr
<
test
>
ptr
);
...
...
libcaf_test/caf/test/unit_test_impl.hpp
View file @
a7468026
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#ifndef CAF_TEST_UNIT_TEST_IMPL_HPP
#ifndef CAF_TEST_UNIT_TEST_IMPL_HPP
#define CAF_TEST_UNIT_TEST_IMPL_HPP
#define CAF_TEST_UNIT_TEST_IMPL_HPP
#include <regex>
#include <thread>
#include <thread>
#include <cassert>
#include <cassert>
#include <cstdlib>
#include <cstdlib>
...
...
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