Commit a7468026 authored by Dominik Charousset's avatar Dominik Charousset

Fix shadowing and documentation warnings

parent 425f224b
......@@ -188,7 +188,7 @@ class binary_util {
};
struct is_message {
explicit is_message(message& msg) : msg(msg) {
explicit is_message(message& msgref) : msg(msgref) {
// nop
}
......
......@@ -825,6 +825,8 @@ CAF_TEST(constructor_attach) {
anon_send(spawn<spawner>(), atom("die"));
}
namespace {
class exception_testee : public event_based_actor {
public:
exception_testee() {
......@@ -841,6 +843,8 @@ class exception_testee : public event_based_actor {
}
};
} // namespace <anonymous>
CAF_TEST(custom_exception_handler) {
auto handler = [](const std::exception_ptr& eptr) -> optional<uint32_t> {
try {
......
......@@ -56,7 +56,7 @@ constexpr size_t num_pings = 10;
size_t s_pongs = 0;
behavior ping_behavior(local_actor* self, size_t num_pings) {
behavior ping_behavior(local_actor* self, size_t ping_msgs) {
return {
on(atom("pong"), arg_match) >> [=](int value)->message {
if (!self->current_sender()) {
......@@ -64,7 +64,7 @@ behavior ping_behavior(local_actor* self, size_t num_pings) {
}
CAF_TEST_INFO("received {'pong', " << value << "}");
// cout << to_string(self->current_message()) << endl;
if (++s_pongs >= num_pings) {
if (++s_pongs >= ping_msgs) {
CAF_TEST_INFO("reached maximum, send {'EXIT', user_defined} "
<< "to last sender and quit with normal reason");
self->send_exit(self->current_sender(),
......@@ -94,9 +94,9 @@ size_t pongs() {
return s_pongs;
}
void event_based_ping(event_based_actor* self, size_t num_pings) {
void event_based_ping(event_based_actor* self, size_t ping_msgs) {
s_pongs = 0;
self->become(ping_behavior(self, num_pings));
self->become(ping_behavior(self, ping_msgs));
}
void pong(blocking_actor* self, actor ping_actor) {
......
......@@ -21,7 +21,6 @@
#define CAF_TEST_UNIT_TEST_HPP
#include <map>
#include <regex>
#include <cmath>
#include <mutex>
#include <thread>
......@@ -235,7 +234,7 @@ class engine {
/**
* Adds a test to the engine.
* @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);
......
......@@ -20,6 +20,7 @@
#ifndef CAF_TEST_UNIT_TEST_IMPL_HPP
#define CAF_TEST_UNIT_TEST_IMPL_HPP
#include <regex>
#include <thread>
#include <cassert>
#include <cstdlib>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment