Fixed bug in parser when "null", "true" or "false" is mispelled

This commit is contained in:
Benoit Blanchon committed 2014-10-31 21:08:04 +01:00
1 parent 98463ea168
commit fead9b50b1
3 files changed
+33 -10

No files matched your search

+15
View File
@@ -143,6 +143,21 @@ TEST_F(JsonParser_Array_Tests, TwoNulls) {
secondElementMustBe(nullCharPtr);
}
TEST_F(JsonParser_Array_Tests, IncompleteNull) {
whenInputIs("[nul!]");
parseMustFail();
}
TEST_F(JsonParser_Array_Tests, IncompleteTrue) {
whenInputIs("[tru!]");
parseMustFail();
}
TEST_F(JsonParser_Array_Tests, IncompleteFalse) {
whenInputIs("[fals!]");
parseMustFail();
}
TEST_F(JsonParser_Array_Tests, TwoStrings) {
whenInputIs("[\"hello\",\"world\"]");