summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNalinichandra Penke <chandrapenke@gmail.com>2016-02-22 14:27:08 -0600
committerNalinichandra Penke <chandrapenke@gmail.com>2016-02-22 14:34:20 -0600
commitcbab26673b99b0a5dff9907fbe08e1efc211f1ff (patch)
treeef25438b853ae53c82d7a7369f01e238693fe71e /tests
parent1cf5e3f751b3a5432b28a2b5b1f752687fe43764 (diff)
downloadflatbuffers-cbab26673b99b0a5dff9907fbe08e1efc211f1ff.tar.gz
flatbuffers-cbab26673b99b0a5dff9907fbe08e1efc211f1ff.tar.bz2
flatbuffers-cbab26673b99b0a5dff9907fbe08e1efc211f1ff.zip
Fix #3775: Skip unknown field names if they're quoted
Diffstat (limited to 'tests')
-rw-r--r--tests/test.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test.cpp b/tests/test.cpp
index fce249e9..42d9e3ce 100644
--- a/tests/test.cpp
+++ b/tests/test.cpp
@@ -830,10 +830,13 @@ void UnknownFieldsTest() {
TEST_EQ(parser.Parse("table T { str:string; i:int;}"
"root_type T;"
"{ str:\"test\","
+ "unknown_string:\"test\","
+ "\"unknown_string\":\"test\","
"unknown_int:10,"
"unknown_float:1.0,"
"unknown_array: [ 1, 2, 3, 4],"
"unknown_object: { i: 10 },"
+ "\"unknown_object\": { \"i\": 10 },"
"i:10}"), true);
std::string jsongen;