Fixed parsing when opening brace/bracket is missing

This commit is contained in:
Benoit Blanchon
2014-10-31 16:50:21 +01:00
parent 2b5b8fb4c5
commit 74b4544560
3 changed files with 13 additions and 7 deletions

View File

@ -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();
}