mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-22 14:57:33 +02:00
Fixed parsing when opening brace/bracket is missing
This commit is contained in:
@ -58,9 +58,13 @@ TEST_F(JsonParser_Array_Tests, EmptyArray) {
|
||||
sizeMustBe(0);
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Array_Tests, MissingOpeningBracket) {
|
||||
whenInputIs("]");
|
||||
parseMustFail();
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Array_Tests, ArrayWithNoEnd) {
|
||||
whenInputIs("[");
|
||||
|
||||
parseMustFail();
|
||||
}
|
||||
|
||||
|
@ -45,22 +45,24 @@ TEST_F(JsonParser_Object_Test, EmptyObject) {
|
||||
sizeMustBe(0);
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Object_Test, MissingOpeningBrace) {
|
||||
whenInputIs("}");
|
||||
parseMustFail();
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Object_Test, MissingClosingBrace) {
|
||||
whenInputIs("{");
|
||||
parseMustFail();
|
||||
sizeMustBe(0);
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Object_Test, MissingColonAndValue) {
|
||||
whenInputIs("{\"key\"}");
|
||||
parseMustFail();
|
||||
sizeMustBe(0);
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Object_Test, MissingQuotesAndColonAndValue) {
|
||||
whenInputIs("{key}");
|
||||
parseMustFail();
|
||||
sizeMustBe(0);
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Object_Test, OneString) {
|
||||
|
Reference in New Issue
Block a user