Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
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
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
Libraries
json
Commits
678d310b
Commit
678d310b
authored
Jul 19, 2020
by
pf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[JSON] don't know why CHECK doesn't like "CHECK(obj1 == obj2)". So using a temporary bool.
parent
e83ddb18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
test/src/unit-udt_macro.cpp
test/src/unit-udt_macro.cpp
+12
-6
No files found.
test/src/unit-udt_macro.cpp
View file @
678d310b
...
...
@@ -222,7 +222,8 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
nlohmann
::
json
j
=
obj1
;
//via json object
T
obj2
;
j
.
get_to
(
obj2
);
CHECK
(
obj1
==
obj2
);
bool
ok
=
(
obj1
==
obj2
);
CHECK
(
ok
);
}
{
...
...
@@ -232,7 +233,8 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
nlohmann
::
json
j2
=
nlohmann
::
json
::
parse
(
s
);
T
obj2
;
j2
.
get_to
(
obj2
);
CHECK
(
obj1
==
obj2
);
bool
ok
=
(
obj1
==
obj2
);
CHECK
(
ok
);
}
{
...
...
@@ -242,7 +244,8 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
nlohmann
::
json
j2
=
nlohmann
::
json
::
from_msgpack
(
buf
);
T
obj2
;
j2
.
get_to
(
obj2
);
CHECK
(
obj1
==
obj2
);
bool
ok
=
(
obj1
==
obj2
);
CHECK
(
ok
);
}
{
...
...
@@ -252,7 +255,8 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
nlohmann
::
json
j2
=
nlohmann
::
json
::
from_bson
(
buf
);
T
obj2
;
j2
.
get_to
(
obj2
);
CHECK
(
obj1
==
obj2
);
bool
ok
=
(
obj1
==
obj2
);
CHECK
(
ok
);
}
{
...
...
@@ -262,7 +266,8 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
nlohmann
::
json
j2
=
nlohmann
::
json
::
from_cbor
(
buf
);
T
obj2
;
j2
.
get_to
(
obj2
);
CHECK
(
obj1
==
obj2
);
bool
ok
=
(
obj1
==
obj2
);
CHECK
(
ok
);
}
{
...
...
@@ -272,7 +277,8 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
nlohmann
::
json
j2
=
nlohmann
::
json
::
from_ubjson
(
buf
);
T
obj2
;
j2
.
get_to
(
obj2
);
CHECK
(
obj1
==
obj2
);
bool
ok
=
(
obj1
==
obj2
);
CHECK
(
ok
);
}
}
}
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