diff options
author | Wouter van Oortmerssen <wvo@google.com> | 2014-09-03 14:48:37 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <wvo@google.com> | 2014-09-03 14:48:37 -0700 |
commit | 57b614587c45ce5751ef5533c34131273be01cf2 (patch) | |
tree | e43e9da42486bce9a87c0cf2253a36699c4a103c /tests | |
parent | 15dc1a86cd9e1fd22a46fde1a3632418eb8d9466 (diff) | |
download | flatbuffers-57b614587c45ce5751ef5533c34131273be01cf2.tar.gz flatbuffers-57b614587c45ce5751ef5533c34131273be01cf2.tar.bz2 flatbuffers-57b614587c45ce5751ef5533c34131273be01cf2.zip |
Setting a field twice in a JSON object now gives error.
Before, it would crash in FlatBufferBuilder.
Bug: 17357164
Change-Id: I6e6dbada5261745220345379eb53eb3eb113e8f8
Tested: on Linux.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test.cpp b/tests/test.cpp index 03955e33..4cd4fd1e 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -490,6 +490,7 @@ void ErrorTest() { TestError("union Z { X } struct X { Y:int; }", "only tables"); TestError("table X { Y:[int]; YLength:int; }", "clash"); TestError("table X { Y:string = 1; }", "scalar"); + TestError("table X { Y:byte; } root_type X; { Y:1, Y:2 }", "already set"); } // Additional parser testing not covered elsewhere. |