Test what happens with just an opening bracket

This commit is contained in:
Benoit Blanchon committed 2014-10-14 21:35:47 +02:00
1 parent ded6364e1d
commit ee205971e9
2 files changed
+12 -2

No files matched your search

+8
View File
@@ -16,6 +16,14 @@ TEST_F(JsonArray_Parser_Tests, EmptyArray)
EXPECT_EQ(0, array.size());
}
TEST_F(JsonArray_Parser_Tests, ArrayWithNoEnd)
{
JsonArray array = json.parseArray("[");
EXPECT_FALSE(array.success());
EXPECT_EQ(0, array.size());
}
TEST_F(JsonArray_Parser_Tests, EmptyArrayWithLeadingSpaces)
{
JsonArray array = json.parseArray(" []");