Made "field set more than once" check in JSON parser faster.

Change-Id: I3ecc1aa610526c270faa56cc5266f14cd81db247
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2014-09-04 11:57:09 -07:00
parent ea57dfe897
commit 11f2538610
3 changed files with 14 additions and 7 deletions

View File

@@ -490,7 +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");
TestError("table X { Y:byte; } root_type X; { Y:1, Y:2 }", "more than once");
}
// Additional parser testing not covered elsewhere.