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
813fed9b
Commit
813fed9b
authored
Dec 08, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several warnings
parent
1031dae6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
18 deletions
+16
-18
libcaf_core/src/logger.cpp
libcaf_core/src/logger.cpp
+1
-0
libcaf_core/test/config_option.cpp
libcaf_core/test/config_option.cpp
+1
-1
libcaf_core/test/inspector.cpp
libcaf_core/test/inspector.cpp
+1
-1
libcaf_core/test/request_timeout.cpp
libcaf_core/test/request_timeout.cpp
+10
-10
libcaf_core/test/simple_timeout.cpp
libcaf_core/test/simple_timeout.cpp
+1
-1
libcaf_core/test/typed_response_promise.cpp
libcaf_core/test/typed_response_promise.cpp
+0
-3
libcaf_test/caf/test/unit_test.hpp
libcaf_test/caf/test/unit_test.hpp
+1
-1
tools/caf-vec.cpp
tools/caf-vec.cpp
+1
-1
No files found.
libcaf_core/src/logger.cpp
View file @
813fed9b
...
...
@@ -321,6 +321,7 @@ logger::logger(actor_system& sys) : system_(sys) {
}
void
logger
::
init
(
actor_system_config
&
cfg
)
{
CAF_IGNORE_UNUSED
(
cfg
);
#if defined(CAF_LOG_LEVEL)
auto
lvl_atom
=
cfg
.
logger_verbosity
;
switch
(
static_cast
<
uint64_t
>
(
lvl_atom
))
{
...
...
libcaf_core/test/config_option.cpp
View file @
813fed9b
...
...
@@ -193,7 +193,7 @@ CAF_TEST(type_float) {
std
::
tie
(
result
,
error_str
)
=
run_config_option
(
init_value
,
boundary_check
);
float
float_inf
=
std
::
numeric_limits
<
float
>::
infinity
();
// Unit test does not compare inf values correct until now
bool
tmp
=
float_inf
==
result
;
bool
tmp
=
float_inf
==
result
;
CAF_CHECK_NOT_EQUAL
(
tmp
,
true
);
CAF_CHECK_EQUAL
(
result
,
init_value
);
CAF_CHECK_EQUAL
(
error_str
.
empty
(),
false
);
...
...
libcaf_core/test/inspector.cpp
View file @
813fed9b
...
...
@@ -241,7 +241,7 @@ struct binary_serialization_policy {
T
y
;
g
(
y
);
CAF_CHECK_EQUAL
(
x
,
y
);
return
x
==
y
;
return
detail
::
safe_equal
(
x
,
y
)
;
}
};
}
// namespace <anonymous>
...
...
libcaf_core/test/request_timeout.cpp
View file @
813fed9b
...
...
@@ -302,16 +302,16 @@ CAF_TEST(single_timeout) {
CAF_MESSAGE
(
"test implemenation "
<<
f
.
second
);
auto
testee
=
system
.
spawn
(
f
.
first
,
&
had_timeout
,
system
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
u
);
CAF_REQUIRE_EQUAL
(
sched
.
next_job
<
local_actor
>
().
name
(),
string
{
"ping"
});
sched
.
run_once
();
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
u
);
CAF_REQUIRE_EQUAL
(
sched
.
next_job
<
local_actor
>
().
name
(),
string
{
"pong"
});
sched
.
dispatch
();
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
2
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
2
u
);
// now, the timeout message is already dispatched, while pong did
// not respond to the message yet, i.e., timeout arrives before response
CAF_CHECK_EQUAL
(
sched
.
run
(),
2
);
CAF_CHECK_EQUAL
(
sched
.
run
(),
2
u
);
CAF_CHECK
(
had_timeout
);
}
}
...
...
@@ -325,13 +325,13 @@ CAF_TEST(nested_timeout) {
CAF_MESSAGE
(
"test implemenation "
<<
f
.
second
);
auto
testee
=
system
.
spawn
(
f
.
first
,
&
had_timeout
,
system
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
u
);
CAF_REQUIRE_EQUAL
(
sched
.
next_job
<
local_actor
>
().
name
(),
string
{
"ping"
});
sched
.
run_once
();
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
u
);
CAF_REQUIRE_EQUAL
(
sched
.
next_job
<
local_actor
>
().
name
(),
string
{
"pong"
});
sched
.
dispatch
();
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
2
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
2
u
);
// now, the timeout message is already dispatched, while pong did
// not respond to the message yet, i.e., timeout arrives before response
sched
.
run
();
...
...
@@ -355,13 +355,13 @@ CAF_TEST(multiplexed_timeout) {
CAF_MESSAGE
(
"test implemenation "
<<
f
.
second
);
auto
testee
=
system
.
spawn
(
f
.
first
,
&
had_timeout
,
system
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
u
);
CAF_REQUIRE_EQUAL
(
sched
.
next_job
<
local_actor
>
().
name
(),
string
{
"ping"
});
sched
.
run_once
();
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1
u
);
CAF_REQUIRE_EQUAL
(
sched
.
next_job
<
local_actor
>
().
name
(),
string
{
"pong"
});
sched
.
dispatch
();
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
2
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
2
u
);
// now, the timeout message is already dispatched, while pong did
// not respond to the message yet, i.e., timeout arrives before response
sched
.
run
();
...
...
libcaf_core/test/simple_timeout.cpp
View file @
813fed9b
...
...
@@ -104,7 +104,7 @@ CAF_TEST(duration_conversion) {
duration
d1
{
time_unit
::
milliseconds
,
100
};
std
::
chrono
::
milliseconds
d2
{
100
};
duration
d3
{
d2
};
CAF_CHECK_EQUAL
(
d1
.
count
,
d2
.
count
(
));
CAF_CHECK_EQUAL
(
d1
.
count
,
static_cast
<
uint64_t
>
(
d2
.
count
()
));
CAF_CHECK_EQUAL
(
d1
,
d3
);
}
...
...
libcaf_core/test/typed_response_promise.cpp
View file @
813fed9b
...
...
@@ -26,9 +26,6 @@
#include "caf/all.hpp"
#define ERROR_HANDLER \
[&](error& err) { CAF_FAIL(system.render(err)); }
using
namespace
caf
;
namespace
{
...
...
libcaf_test/caf/test/unit_test.hpp
View file @
813fed9b
...
...
@@ -49,7 +49,7 @@ bool equal_to(const T& t, const U& u) {
auto
y
=
static_cast
<
long
double
>
(
u
);
auto
max
=
std
::
max
(
std
::
abs
(
x
),
std
::
abs
(
y
));
auto
dif
=
std
::
abs
(
x
-
y
);
return
dif
<=
max
*
1e-5
;
return
dif
<=
max
*
1e-5
l
;
}
template
<
class
T
,
class
U
,
...
...
tools/caf-vec.cpp
View file @
813fed9b
...
...
@@ -47,7 +47,7 @@ std::istream& skip_to_next_line(std::istream& in) {
std
::
istream
&
skip_word
(
std
::
istream
&
in
)
{
skip_whitespaces
(
in
);
auto
nonspace
=
[](
char
x
)
{
return
isprint
(
x
)
&&
!
isspace
(
x
);
};
while
(
nonspace
(
in
.
peek
(
)))
while
(
nonspace
(
static_cast
<
char
>
(
in
.
peek
()
)))
in
.
get
();
return
in
;
}
...
...
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