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
bb1056d2
Commit
bb1056d2
authored
Sep 10, 2012
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed to_string woes
parent
a10a8d38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/group_manager.cpp
src/group_manager.cpp
+1
-1
unit_testing/test__serialization.cpp
unit_testing/test__serialization.cpp
+4
-4
No files found.
src/group_manager.cpp
View file @
bb1056d2
...
...
@@ -579,7 +579,7 @@ group_manager::group_manager() {
intrusive_ptr
<
group
>
group_manager
::
anonymous
()
{
string
id
=
"__#"
;
id
+=
to_string
(
++
m_ad_hoc_id
);
id
+=
std
::
to_string
(
++
m_ad_hoc_id
);
return
get_module
(
"local"
)
->
get
(
id
);
}
...
...
unit_testing/test__serialization.cpp
View file @
bb1056d2
...
...
@@ -170,7 +170,7 @@ int main() {
raw_struct
rs2
;
uniform_typeid
<
raw_struct
>
()
->
deserialize
(
&
rs2
,
&
bd
);
CPPA_CHECK_EQUAL
(
rs
.
str
,
rs2
.
str
);
auto
rsstr
=
cppa
::
to_string
(
rs
);
auto
rsstr
=
to_string
(
object
::
from
(
rs
)
);
rs2
.
str
=
"foobar"
;
cout
<<
"rs as string: "
<<
rsstr
<<
endl
;
rs2
=
from_string
<
raw_struct
>
(
rsstr
);
...
...
@@ -266,7 +266,7 @@ int main() {
if
(
meta_int
)
{
auto
o
=
meta_int
->
create
();
get_ref
<
uint32_t
>
(
o
)
=
42
;
auto
str
=
cppa
::
to_string
(
get
<
uint32_t
>
(
o
));
auto
str
=
cppa
::
to_string
(
object
::
from
(
get
<
uint32_t
>
(
o
)
));
CPPA_CHECK_EQUAL
(
"@u32 ( 42 )"
,
str
);
}
}
...
...
@@ -285,7 +285,7 @@ int main() {
auto
b1str
=
"struct_b ( struct_a ( 1, 2 ), 3, "
"{ 4, 5, 6, 7, 8, 9, 10 } )"
;
// verify
CPPA_CHECK_EQUAL
((
to_string
(
b1
)),
b1str
);
{
CPPA_CHECK_EQUAL
((
to_string
(
object
::
from
(
b1
)
)),
b1str
);
{
// serialize b1 to buf
util
::
buffer
wr_buf
;
binary_serializer
bs
(
&
wr_buf
);
...
...
@@ -299,7 +299,7 @@ int main() {
}
// verify result of serialization / deserialization
CPPA_CHECK
(
b1
==
b2
);
CPPA_CHECK_EQUAL
(
to_string
(
b2
),
b1str
);
CPPA_CHECK_EQUAL
(
to_string
(
object
::
from
(
b2
)
),
b1str
);
{
// deserialize b3 from string
object
res
=
from_string
(
b1str
);
CPPA_CHECK_EQUAL
(
res
.
type
()
->
name
(),
"struct_b"
);
...
...
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