[JSON] don't know why CHECK doesn't like "CHECK(obj1 == obj2)". So using a temporary bool.
This commit is contained in:
parent
e83ddb185d
commit
678d310b85
1 changed files with 12 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue