mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 22:20:56 +00:00
New error: declaring an enum field without a default in range of the enum.
Change-Id: I4db7f032440c00d31c7434975b8a3f17c29d74b9 Tested: on Linux.
This commit is contained in:
@@ -1179,6 +1179,8 @@ void ErrorTest() {
|
||||
TestError("table X { Y:int; Y:int; }", "field already");
|
||||
TestError("table Y {} table X { Y:int; }", "same as table");
|
||||
TestError("struct X { Y:string; }", "only scalar");
|
||||
TestError("table X { Y:string = 1; }", "default values");
|
||||
TestError("enum Y:byte { Z = 1 } table X { y:Y; }", "not part of enum");
|
||||
TestError("struct X { Y:int (deprecated); }", "deprecate");
|
||||
TestError("union Z { X } table X { Y:Z; } root_type X; { Y: {}, A:1 }",
|
||||
"missing type field");
|
||||
@@ -1968,7 +1970,7 @@ int main(int /*argc*/, const char * /*argv*/ []) {
|
||||
EndianSwapTest();
|
||||
|
||||
JsonDefaultTest();
|
||||
|
||||
|
||||
FlexBuffersTest();
|
||||
|
||||
if (!testing_fails) {
|
||||
|
||||
Reference in New Issue
Block a user