mirror of
https://github.com/nlohmann/json.git
synced 2026-10-20 21:18:15 +00:00
[JSON] use CHECK from doctest
This commit is contained in:
1 parent
254f0e3cee
commit
e83ddb185d
1 file changed
+6
-6
@@ -222,7 +222,7 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
|
|||||||
nlohmann::json j = obj1; //via json object
|
nlohmann::json j = obj1; //via json object
|
||||||
T obj2;
|
T obj2;
|
||||||
j.get_to(obj2);
|
j.get_to(obj2);
|
||||||
assert(obj1 == obj2);
|
CHECK(obj1 == obj2);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -232,7 +232,7 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
|
|||||||
nlohmann::json j2 = nlohmann::json::parse(s);
|
nlohmann::json j2 = nlohmann::json::parse(s);
|
||||||
T obj2;
|
T obj2;
|
||||||
j2.get_to(obj2);
|
j2.get_to(obj2);
|
||||||
assert(obj1 == obj2);
|
CHECK(obj1 == obj2);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -242,7 +242,7 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
|
|||||||
nlohmann::json j2 = nlohmann::json::from_msgpack(buf);
|
nlohmann::json j2 = nlohmann::json::from_msgpack(buf);
|
||||||
T obj2;
|
T obj2;
|
||||||
j2.get_to(obj2);
|
j2.get_to(obj2);
|
||||||
assert(obj1 == obj2);
|
CHECK(obj1 == obj2);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -252,7 +252,7 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
|
|||||||
nlohmann::json j2 = nlohmann::json::from_bson(buf);
|
nlohmann::json j2 = nlohmann::json::from_bson(buf);
|
||||||
T obj2;
|
T obj2;
|
||||||
j2.get_to(obj2);
|
j2.get_to(obj2);
|
||||||
assert(obj1 == obj2);
|
CHECK(obj1 == obj2);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -262,7 +262,7 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
|
|||||||
nlohmann::json j2 = nlohmann::json::from_cbor(buf);
|
nlohmann::json j2 = nlohmann::json::from_cbor(buf);
|
||||||
T obj2;
|
T obj2;
|
||||||
j2.get_to(obj2);
|
j2.get_to(obj2);
|
||||||
assert(obj1 == obj2);
|
CHECK(obj1 == obj2);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -272,7 +272,7 @@ TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/priv
|
|||||||
nlohmann::json j2 = nlohmann::json::from_ubjson(buf);
|
nlohmann::json j2 = nlohmann::json::from_ubjson(buf);
|
||||||
T obj2;
|
T obj2;
|
||||||
j2.get_to(obj2);
|
j2.get_to(obj2);
|
||||||
assert(obj1 == obj2);
|
CHECK(obj1 == obj2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user