Fix comma tests.

This commit is contained in:
Johan Vromans
2023-01-12 20:53:26 +01:00
committed by Benoît Blanchon
parent c49adfd6da
commit 3345255f16

View File

@ -100,7 +100,7 @@ TEST_CASE("deserialize JSON object") {
REQUIRE(obj["key"] == "value");
}
SECTION("Before the colon") {
SECTION("Before the comma") {
DeserializationError err =
deserializeJson(doc, "{\"key1\":\"value1\" ,\"key2\":\"value2\"}");
JsonObject obj = doc.as<JsonObject>();
@ -112,9 +112,9 @@ TEST_CASE("deserialize JSON object") {
REQUIRE(obj["key2"] == "value2");
}
SECTION("After the colon") {
SECTION("After the comma") {
DeserializationError err =
deserializeJson(doc, "{\"key1\":\"value1\" ,\"key2\":\"value2\"}");
deserializeJson(doc, "{\"key1\":\"value1\", \"key2\":\"value2\"}");
JsonObject obj = doc.as<JsonObject>();
REQUIRE(err == DeserializationError::Ok);