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
5112e542
Commit
5112e542
authored
Feb 27, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix formatting
parent
8148d03c
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
61 additions
and
84 deletions
+61
-84
examples/curl/curl_fuse.cpp
examples/curl/curl_fuse.cpp
+1
-1
examples/custom_type/custom_types_1.cpp
examples/custom_type/custom_types_1.cpp
+1
-2
examples/streaming/integer_stream.cpp
examples/streaming/integer_stream.cpp
+2
-2
libcaf_core/caf/const_typed_message_view.hpp
libcaf_core/caf/const_typed_message_view.hpp
+0
-1
libcaf_core/caf/detail/append_hex.hpp
libcaf_core/caf/detail/append_hex.hpp
+1
-2
libcaf_core/caf/detail/make_meta_object.hpp
libcaf_core/caf/detail/make_meta_object.hpp
+2
-4
libcaf_core/caf/detail/param_message_view.hpp
libcaf_core/caf/detail/param_message_view.hpp
+1
-2
libcaf_core/caf/detail/split_join.hpp
libcaf_core/caf/detail/split_join.hpp
+1
-2
libcaf_core/caf/detail/type_traits.hpp
libcaf_core/caf/detail/type_traits.hpp
+1
-1
libcaf_core/caf/mailbox_element.hpp
libcaf_core/caf/mailbox_element.hpp
+0
-1
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+2
-4
libcaf_core/caf/type_id.hpp
libcaf_core/caf/type_id.hpp
+14
-14
libcaf_core/src/detail/type_id_list_builder.cpp
libcaf_core/src/detail/type_id_list_builder.cpp
+1
-1
libcaf_core/src/init_global_meta_objects.cpp
libcaf_core/src/init_global_meta_objects.cpp
+2
-2
libcaf_core/test/actor_clock.cpp
libcaf_core/test/actor_clock.cpp
+1
-1
libcaf_core/test/blocking_actor.cpp
libcaf_core/test/blocking_actor.cpp
+5
-9
libcaf_core/test/core-test.hpp
libcaf_core/test/core-test.hpp
+14
-15
libcaf_core/test/detail/message_builder_element.cpp
libcaf_core/test/detail/message_builder_element.cpp
+1
-3
libcaf_core/test/detail/type_id_list_builder.cpp
libcaf_core/test/detail/type_id_list_builder.cpp
+1
-3
libcaf_core/test/fused_downstream_manager.cpp
libcaf_core/test/fused_downstream_manager.cpp
+3
-4
libcaf_core/test/message.cpp
libcaf_core/test/message.cpp
+3
-2
libcaf_core/test/message_lifetime.cpp
libcaf_core/test/message_lifetime.cpp
+4
-6
libcaf_core/test/typed_spawn.cpp
libcaf_core/test/typed_spawn.cpp
+0
-1
tools/caf-vec.cpp
tools/caf-vec.cpp
+0
-1
No files found.
examples/curl/curl_fuse.cpp
View file @
5112e542
...
...
@@ -58,7 +58,7 @@ CAF_POP_WARNINGS
CAF_BEGIN_TYPE_ID_BLOCK
(
curl_fuse
,
first_custom_type_id
)
CAF_ADD_TYPE_ID
(
curl_fuse
,
(
std
::
vector
<
char
>
))
CAF_ADD_TYPE_ID
(
curl_fuse
,
(
std
::
vector
<
char
>
)
)
CAF_ADD_ATOM
(
curl_fuse
,
read_atom
);
CAF_ADD_ATOM
(
curl_fuse
,
fail_atom
);
...
...
examples/custom_type/custom_types_1.cpp
View file @
5112e542
...
...
@@ -19,12 +19,11 @@ CAF_BEGIN_TYPE_ID_BLOCK(custom_types_1, first_custom_type_id)
CAF_ADD_TYPE_ID
(
custom_types_1
,
(
foo
))
CAF_ADD_TYPE_ID
(
custom_types_1
,
(
foo2
))
CAF_ADD_TYPE_ID
(
custom_types_1
,
(
std
::
pair
<
int32_t
,
int32_t
>
))
CAF_ADD_TYPE_ID
(
custom_types_1
,
(
std
::
pair
<
int32_t
,
int32_t
>
)
)
CAF_END_TYPE_ID_BLOCK
(
custom_types_1
)
// --(rst-type-id-block-end)--
using
std
::
cout
;
using
std
::
cerr
;
using
std
::
endl
;
...
...
examples/streaming/integer_stream.cpp
View file @
5112e542
...
...
@@ -9,8 +9,8 @@
CAF_BEGIN_TYPE_ID_BLOCK
(
integer_stream
,
first_custom_type_id
)
CAF_ADD_TYPE_ID
(
integer_stream
,
(
caf
::
stream
<
int32_t
>
))
CAF_ADD_TYPE_ID
(
integer_stream
,
(
std
::
vector
<
int32_t
>
))
CAF_ADD_TYPE_ID
(
integer_stream
,
(
caf
::
stream
<
int32_t
>
)
)
CAF_ADD_TYPE_ID
(
integer_stream
,
(
std
::
vector
<
int32_t
>
)
)
CAF_END_TYPE_ID_BLOCK
(
integer_stream
)
...
...
libcaf_core/caf/const_typed_message_view.hpp
View file @
5112e542
...
...
@@ -52,7 +52,6 @@ public:
return
ptr_
!=
nullptr
;
}
private:
const
detail
::
message_data
*
ptr_
;
};
...
...
libcaf_core/caf/detail/append_hex.hpp
View file @
5112e542
...
...
@@ -27,8 +27,7 @@
namespace
caf
::
detail
{
CAF_CORE_EXPORT
void
append_hex
(
std
::
string
&
result
,
const
byte
*
xs
,
size_t
n
);
CAF_CORE_EXPORT
void
append_hex
(
std
::
string
&
result
,
const
byte
*
xs
,
size_t
n
);
template
<
class
T
>
enable_if_t
<
has_data_member
<
T
>::
value
>
...
...
libcaf_core/caf/detail/make_meta_object.hpp
View file @
5112e542
...
...
@@ -49,14 +49,12 @@ void copy_construct(void* ptr, const void* src) {
}
template
<
class
T
>
error_code
<
sec
>
save_binary
(
caf
::
binary_serializer
&
sink
,
const
void
*
ptr
)
{
error_code
<
sec
>
save_binary
(
caf
::
binary_serializer
&
sink
,
const
void
*
ptr
)
{
return
sink
(
*
reinterpret_cast
<
const
T
*>
(
ptr
));
}
template
<
class
T
>
error_code
<
sec
>
load_binary
(
caf
::
binary_deserializer
&
source
,
void
*
ptr
)
{
error_code
<
sec
>
load_binary
(
caf
::
binary_deserializer
&
source
,
void
*
ptr
)
{
return
source
(
*
reinterpret_cast
<
T
*>
(
ptr
));
}
...
...
libcaf_core/caf/detail/param_message_view.hpp
View file @
5112e542
...
...
@@ -34,8 +34,7 @@ public:
param_message_view
(
const
param_message_view
&
)
noexcept
=
default
;
param_message_view
&
operator
=
(
const
param_message_view
&
)
noexcept
=
default
;
param_message_view
&
operator
=
(
const
param_message_view
&
)
noexcept
=
default
;
const
detail
::
message_data
*
operator
->
()
const
noexcept
{
return
ptr_
;
...
...
libcaf_core/caf/detail/split_join.hpp
View file @
5112e542
...
...
@@ -51,8 +51,7 @@ public:
split_
(
workset_
,
msg
);
for
(
auto
&
x
:
workset_
)
this
->
send
(
x
.
first
,
std
::
move
(
x
.
second
));
auto
g
=
[
=
](
scheduled_actor
*
,
message
&
res
)
mutable
->
result
<
message
>
{
auto
g
=
[
=
](
scheduled_actor
*
,
message
&
res
)
mutable
->
result
<
message
>
{
join_
(
value_
,
res
);
if
(
--
awaited_results_
==
0
)
{
rp
.
deliver
(
value_
);
...
...
libcaf_core/caf/detail/type_traits.hpp
View file @
5112e542
...
...
@@ -746,7 +746,7 @@ template <class T>
constexpr
bool
is_stl_tuple_type_v
=
is_stl_tuple_type
<
T
>::
value
;
template
<
class
T
,
std
::
size_t
=
sizeof
(
T
)>
std
::
true_type
is_complete_impl
(
T
*
);
std
::
true_type
is_complete_impl
(
T
*
);
std
::
false_type
is_complete_impl
(...);
...
...
libcaf_core/caf/mailbox_element.hpp
View file @
5112e542
...
...
@@ -82,7 +82,6 @@ public:
}
};
/// @relates mailbox_element
template
<
class
Inspector
>
typename
Inspector
::
result_type
inspect
(
Inspector
&
f
,
mailbox_element
&
x
)
{
...
...
libcaf_core/caf/scheduled_actor.hpp
View file @
5112e542
...
...
@@ -89,8 +89,7 @@ CAF_CORE_EXPORT result<message> reflect(scheduled_actor*, message&);
/// @relates scheduled_actor
/// Default handler function that sends
/// the message back to the sender and then quits.
CAF_CORE_EXPORT
result
<
message
>
reflect_and_quit
(
scheduled_actor
*
,
message
&
);
CAF_CORE_EXPORT
result
<
message
>
reflect_and_quit
(
scheduled_actor
*
,
message
&
);
/// @relates scheduled_actor
/// Default handler function that prints messages
...
...
@@ -191,8 +190,7 @@ public:
using
pointer
=
scheduled_actor
*
;
/// Function object for handling unmatched messages.
using
default_handler
=
std
::
function
<
result
<
message
>
(
pointer
,
message
&
)
>
;
using
default_handler
=
std
::
function
<
result
<
message
>
(
pointer
,
message
&
)
>
;
/// Function object for handling error messages.
using
error_handler
=
std
::
function
<
void
(
pointer
,
error
&
)
>
;
...
...
libcaf_core/caf/type_id.hpp
View file @
5112e542
...
...
@@ -207,14 +207,14 @@ CAF_BEGIN_TYPE_ID_BLOCK(builtin, 0)
// -- C types
CAF_ADD_TYPE_ID
(
builtin
,
(
bool
))
CAF_ADD_TYPE_ID
(
builtin
,
(
double
))
CAF_ADD_TYPE_ID
(
builtin
,
(
float
))
CAF_ADD_TYPE_ID
(
builtin
,
(
bool
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
double
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
float
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
int16_t
))
CAF_ADD_TYPE_ID
(
builtin
,
(
int32_t
))
CAF_ADD_TYPE_ID
(
builtin
,
(
int64_t
))
CAF_ADD_TYPE_ID
(
builtin
,
(
int8_t
))
CAF_ADD_TYPE_ID
(
builtin
,
(
long
double
))
CAF_ADD_TYPE_ID
(
builtin
,
(
long
double
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
uint16_t
))
CAF_ADD_TYPE_ID
(
builtin
,
(
uint32_t
))
CAF_ADD_TYPE_ID
(
builtin
,
(
uint64_t
))
...
...
@@ -225,7 +225,7 @@ CAF_BEGIN_TYPE_ID_BLOCK(builtin, 0)
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
string
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
u16string
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
u32string
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
set
<
std
::
string
>
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
set
<
std
::
string
>
)
)
// -- CAF types
...
...
@@ -233,7 +233,7 @@ CAF_BEGIN_TYPE_ID_BLOCK(builtin, 0)
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
actor_addr
))
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
byte_buffer
))
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
config_value
))
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
dictionary
<
caf
::
config_value
>
))
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
dictionary
<
caf
::
config_value
>
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
down_msg
))
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
downstream_msg
))
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
error
))
...
...
@@ -252,12 +252,12 @@ CAF_BEGIN_TYPE_ID_BLOCK(builtin, 0)
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
upstream_msg
))
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
uri
))
CAF_ADD_TYPE_ID
(
builtin
,
(
caf
::
weak_actor_ptr
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
actor
>
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
actor_addr
>
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
config_value
>
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
strong_actor_ptr
>
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
weak_actor_ptr
>
))
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
std
::
pair
<
std
::
string
,
message
>>
));
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
actor
>
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
actor_addr
>
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
config_value
>
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
strong_actor_ptr
>
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
caf
::
weak_actor_ptr
>
)
)
CAF_ADD_TYPE_ID
(
builtin
,
(
std
::
vector
<
std
::
pair
<
std
::
string
,
message
>>
)
);
// -- predefined atoms
...
...
@@ -312,4 +312,4 @@ static constexpr type_id_t io_module_begin = builtin_type_ids::end;
static
constexpr
type_id_t
io_module_end
=
io_module_begin
+
19
;
}
// namespace caf
}
// namespace caf
::detail
libcaf_core/src/detail/type_id_list_builder.cpp
View file @
5112e542
...
...
@@ -126,7 +126,7 @@ size_t type_id_list_builder::size() const noexcept {
return
size_
>
0
?
size_
-
1
:
0
;
}
type_id_t
type_id_list_builder
::
operator
[](
size_t
index
)
const
noexcept
{
type_id_t
type_id_list_builder
::
operator
[](
size_t
index
)
const
noexcept
{
CAF_ASSERT
(
index
<
size
());
return
storage_
[
index
+
1
];
}
...
...
libcaf_core/src/init_global_meta_objects.cpp
View file @
5112e542
...
...
@@ -38,9 +38,9 @@
namespace
caf
::
detail
{
void
init_global_builtin_meta_objects
(){
void
init_global_builtin_meta_objects
()
{
make_type_id_sequence
<
builtin_type_ids
::
begin
,
builtin_type_ids
::
end
>
seq
;
init_global_meta_objects_impl
<
builtin_type_ids
>
(
seq
);
}
}
// namespace caf
}
// namespace caf
::detail
libcaf_core/test/actor_clock.cpp
View file @
5112e542
...
...
@@ -43,7 +43,7 @@ behavior testee(stateful_actor<testee_state, raw_event_based_actor>* self,
detail
::
test_actor_clock
*
t
)
{
return
{
[
=
](
ok_atom
)
{
CAF_LOG_TRACE
(
""
<<
self
->
current_mailbox_element
()
->
content
());
CAF_LOG_TRACE
(
""
<<
self
->
current_mailbox_element
()
->
content
());
auto
n
=
t
->
now
()
+
10s
;
self
->
state
.
timeout_id
+=
1
;
t
->
set_ordinary_timeout
(
n
,
self
,
""
,
self
->
state
.
timeout_id
);
...
...
libcaf_core/test/blocking_actor.cpp
View file @
5112e542
...
...
@@ -42,15 +42,11 @@ CAF_TEST_FIXTURE_SCOPE(blocking_actor_tests, fixture)
CAF_TEST
(
catch_all
)
{
self
->
send
(
self
,
42
);
self
->
receive
(
[](
float
)
{
CAF_FAIL
(
"received unexpected float"
);
},
self
->
receive
([](
float
)
{
CAF_FAIL
(
"received unexpected float"
);
},
others
>>
[](
message
&
msg
)
->
result
<
message
>
{
CAF_CHECK_EQUAL
(
to_string
(
msg
),
"(42)"
);
return
sec
::
unexpected_message
;
}
);
});
self
->
receive
(
[](
const
error
&
err
)
{
CAF_CHECK_EQUAL
(
err
,
sec
::
unexpected_message
);
...
...
libcaf_core/test/core-test.hpp
View file @
5112e542
...
...
@@ -42,8 +42,8 @@ public:
}
template
<
class
Inspector
>
friend
typename
Inspector
::
result_type
inspect
(
Inspector
&
f
,
counting_string
&
x
)
{
friend
typename
Inspector
::
result_type
inspect
(
Inspector
&
f
,
counting_string
&
x
)
{
return
f
(
x
.
str_
);
}
...
...
@@ -199,7 +199,6 @@ decltype(auto) inspect(Inspector& f, s3& x) {
return
f
(
x
.
value
);
}
struct
test_array
{
int32_t
value
[
4
];
int32_t
value2
[
2
][
4
];
...
...
@@ -273,9 +272,9 @@ enum dummy_enum { de_foo, de_bar };
CAF_BEGIN_TYPE_ID_BLOCK
(
core_test
,
caf
::
first_custom_type_id
)
ADD_TYPE_ID
((
caf
::
stream
<
int32_t
>
))
ADD_TYPE_ID
((
caf
::
stream
<
std
::
string
>
))
ADD_TYPE_ID
((
caf
::
stream
<
std
::
pair
<
level
,
std
::
string
>>
))
ADD_TYPE_ID
((
caf
::
stream
<
int32_t
>
)
)
ADD_TYPE_ID
((
caf
::
stream
<
std
::
string
>
)
)
ADD_TYPE_ID
((
caf
::
stream
<
std
::
pair
<
level
,
std
::
string
>>
)
)
ADD_TYPE_ID
((
counting_string
))
ADD_TYPE_ID
((
dummy_enum
))
ADD_TYPE_ID
((
dummy_enum_class
))
...
...
@@ -293,15 +292,15 @@ CAF_BEGIN_TYPE_ID_BLOCK(core_test, caf::first_custom_type_id)
ADD_TYPE_ID
((
s1
))
ADD_TYPE_ID
((
s2
))
ADD_TYPE_ID
((
s3
))
ADD_TYPE_ID
((
std
::
map
<
int32_t
,
int32_t
>
))
ADD_TYPE_ID
((
std
::
map
<
std
::
string
,
std
::
u16string
>
))
ADD_TYPE_ID
((
std
::
pair
<
level
,
std
::
string
>
))
ADD_TYPE_ID
((
std
::
tuple
<
int32_t
,
int32_t
,
int32_t
>
))
ADD_TYPE_ID
((
std
::
tuple
<
std
::
string
,
int32_t
,
uint32_t
>
))
ADD_TYPE_ID
((
std
::
vector
<
bool
>
));
ADD_TYPE_ID
((
std
::
vector
<
int32_t
>
))
ADD_TYPE_ID
((
std
::
vector
<
std
::
pair
<
level
,
std
::
string
>>
))
ADD_TYPE_ID
((
std
::
vector
<
std
::
string
>
))
ADD_TYPE_ID
((
std
::
map
<
int32_t
,
int32_t
>
)
)
ADD_TYPE_ID
((
std
::
map
<
std
::
string
,
std
::
u16string
>
)
)
ADD_TYPE_ID
((
std
::
pair
<
level
,
std
::
string
>
)
)
ADD_TYPE_ID
((
std
::
tuple
<
int32_t
,
int32_t
,
int32_t
>
)
)
ADD_TYPE_ID
((
std
::
tuple
<
std
::
string
,
int32_t
,
uint32_t
>
)
)
ADD_TYPE_ID
((
std
::
vector
<
bool
>
)
);
ADD_TYPE_ID
((
std
::
vector
<
int32_t
>
)
)
ADD_TYPE_ID
((
std
::
vector
<
std
::
pair
<
level
,
std
::
string
>>
)
)
ADD_TYPE_ID
((
std
::
vector
<
std
::
string
>
)
)
ADD_TYPE_ID
((
test_array
))
ADD_TYPE_ID
((
test_empty_non_pod
))
ADD_TYPE_ID
((
test_enum
))
...
...
libcaf_core/test/detail/message_builder_element.cpp
View file @
5112e542
...
...
@@ -26,9 +26,7 @@ using namespace caf;
namespace
{
struct
fixture
{
};
struct
fixture
{};
}
// namespace
...
...
libcaf_core/test/detail/type_id_list_builder.cpp
View file @
5112e542
...
...
@@ -26,9 +26,7 @@ using namespace caf;
namespace
{
struct
fixture
{
};
struct
fixture
{};
}
// namespace
...
...
libcaf_core/test/fused_downstream_manager.cpp
View file @
5112e542
...
...
@@ -235,7 +235,7 @@ TESTEE(stream_multiplexer) {
},
[
=
](
stream
<
int32_t
>
in
)
{
CAF_MESSAGE
(
"received handshake for integers"
);
CAF_MESSAGE
(
self
->
current_mailbox_element
()
->
content
());
CAF_MESSAGE
(
self
->
current_mailbox_element
()
->
content
());
return
self
->
state
.
stage
->
add_unchecked_inbound_path
(
in
);
},
[
=
](
stream
<
string
>
in
)
{
...
...
@@ -255,7 +255,6 @@ CAF_TEST_FIXTURE_SCOPE(fused_downstream_manager_tests, fixture)
// Currently fails for some bizarre reason related to type ID list.
CAF_TEST_DISABLED
(
depth_3_pipeline_with_fork
)
{
CAF_MESSAGE
(
"sanity checks"
);
{
using
detail
::
strip_and_convert_t
;
...
...
@@ -267,8 +266,8 @@ CAF_TEST_DISABLED(depth_3_pipeline_with_fork) {
CAF_CHECK_NOT_EQUAL
(
type_id_v
<
strip_and_convert_t
<
int_stream
>>
,
type_id_v
<
strip_and_convert_t
<
str_stream
>>
);
CAF_CHECK_NOT_EQUAL
(
m1
.
types
(),
m2
.
types
());
// CAF_CHECK_NOT_EQUAL(make_type_id_list<int_stream>(),
make_type_id_list<str_stream>());
// auto m1_ = make_message(int_stream{});
// CAF_CHECK_NOT_EQUAL(make_type_id_list<int_stream>(),
//
make_type_id_list<str_stream>());
auto m1_ = make_message(int_stream{});
// auto m2_ = make_message(str_stream{});
// CAF_CHECK_NOT_EQUAL(m1_.types(), m2_.types());
}
...
...
libcaf_core/test/message.cpp
View file @
5112e542
...
...
@@ -50,7 +50,7 @@ std::string msg_as_string(Ts&&... xs) {
}
// namespace
CAF_TEST
(
messages
allow
index
-
based
access
)
{
CAF_TEST
(
messages
allow
index
-
based
access
)
{
auto
msg
=
make_message
(
"abc"
,
uint32_t
{
10
},
20.0
);
CAF_CHECK_EQUAL
(
msg
.
size
(),
3u
);
CAF_CHECK_EQUAL
(
msg
.
types
(),
...
...
@@ -131,7 +131,8 @@ CAF_TEST(maps_to_string) {
CAF_TEST
(
tuples_to_string
)
{
auto
msg1
=
make_message
(
make_tuple
(
1
,
2
,
3
),
4
,
5
);
CAF_CHECK_EQUAL
(
to_string
(
msg1
),
"((1, 2, 3), 4, 5)"
);
auto
msg2
=
make_message
(
make_tuple
(
"one"
s
,
int32_t
{
2
},
uint32_t
{
3
}),
4
,
true
);
auto
msg2
=
make_message
(
make_tuple
(
"one"
s
,
int32_t
{
2
},
uint32_t
{
3
}),
4
,
true
);
CAF_CHECK_EQUAL
(
to_string
(
msg2
),
"((
\"
one
\"
, 2, 3), 4, true)"
);
}
...
...
libcaf_core/test/message_lifetime.cpp
View file @
5112e542
...
...
@@ -119,12 +119,10 @@ CAF_TEST(message_lifetime_in_scoped_actor) {
msg
=
make_message
(
42
);
self
->
send
(
self
,
msg
);
CAF_CHECK_EQUAL
(
msg
.
cdata
().
get_reference_count
(),
2u
);
self
->
receive
(
[
&
](
int
&
value
)
{
self
->
receive
([
&
](
int
&
value
)
{
CAF_CHECK_NOT_EQUAL
(
&
value
,
msg
.
cdata
().
at
(
0
));
value
=
10
;
}
);
});
CAF_CHECK_EQUAL
(
msg
.
get_as
<
int
>
(
0
),
42
);
}
...
...
libcaf_core/test/typed_spawn.cpp
View file @
5112e542
...
...
@@ -31,7 +31,6 @@
# define ERROR_HANDLER [&](error& err) { CAF_FAIL(sys.render(err)); }
using
std
::
string
;
using
namespace
caf
;
...
...
tools/caf-vec.cpp
View file @
5112e542
...
...
@@ -18,7 +18,6 @@ CAF_BEGIN_TYPE_ID_BLOCK(caf_vec, first_custom_type_id)
CAF_END_TYPE_ID_BLOCK
(
caf_vec
)
using
std
::
string
;
using
namespace
caf
;
...
...
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