Files
flatbuffers-bigfoot/tests/prototest/test_suffix_id.golden.fbs
Saman f838017860 Parsing from proto should keep field ID. (fixes #7645) (#7655)
* Parsing from proto should keep field ID. (fixes #7645)

* Fix failed tests

* Fix windows warning

* Improve attribute generation in proto to fbs

* Check if id is used twice. fix Some clang-format problems

* Test if fake id can solve the test problem

* Validate proto file in proto -> fbs generation.

* Fix error messages

* Ignore id in union

* Add keep proto id for legacy and check gap flag have been added. Reserved id will be checked.

* Add needed flags

* unit tests

* fix fromat problem. fix comments and error messages.

* clear

* More unit tests

* Fix windows build

* Fix include problems

* Fake commit to invoke rebuild

* Fix buzel build

* Fix some issues

* Fix comments, fix return value and sort for android NDK

* Fix return type

* Break down big function

* Place todo

---------

Co-authored-by: Derek Bailey <derekbailey@google.com>
2023-02-01 11:17:35 -08:00

88 lines
2.0 KiB
Plaintext

// Generated from test.proto
namespace proto.test.test_namespace_suffix;
/// Enum doc comment.
enum ProtoEnum : int {
NUL = 0,
FOO = 1,
/// Enum 2nd value doc comment misaligned.
BAR = 5,
}
namespace proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage_;
enum ProtoEnum : int {
NUL = 0,
FOO = 1,
BAR = 2,
BAZ = 3,
}
namespace proto.test.test_namespace_suffix;
table ImportedMessage {
a:int (id: 0);
}
/// 2nd table doc comment with
/// many lines.
table ProtoMessage {
c:int = 16 (id: 12);
d:long (id: 1);
p:uint (id: 21);
e:ulong (id: 2);
/// doc comment for f.
f:int = -1 (id: 3);
g:long (id: 4);
h:uint (id: 5);
q:ulong (id: 6);
i:int (id: 7);
j:long (id: 8);
/// doc comment for k.
k:bool (id: 9);
/// doc comment for l on 2
/// lines
l:string (required,id: 10);
m:[ubyte] (id: 11);
n:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage (id: 22);
o:[string] (id: 13);
z:proto.test.test_namespace_suffix.ImportedMessage (id: 14);
/// doc comment for r.
r:proto.test.test_namespace_suffix.ProtoMessage_.Anonymous0 (id: 0);
outer_enum:proto.test.test_namespace_suffix.ProtoEnum (id: 15);
u:float = +inf (id: 16);
v:float = +inf (id: 17);
w:float = -inf (id: 18);
grades:[proto.test.test_namespace_suffix.ProtoMessage_.GradesEntry] (id: 19);
other_message_map:[proto.test.test_namespace_suffix.ProtoMessage_.OtherMessageMapEntry] (id: 20);
}
namespace proto.test.test_namespace_suffix.ProtoMessage_;
table OtherMessage {
a:double (id: 0);
/// doc comment for b.
b:float = 3.14149 (id: 1);
foo_bar_baz:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage_.ProtoEnum (id: 2);
}
table Anonymous0 {
/// doc comment for s.
s:proto.test.test_namespace_suffix.ImportedMessage (id: 0);
/// doc comment for t on 2
/// lines.
t:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage (id: 1);
}
table GradesEntry {
key:string (key);
value:float;
}
table OtherMessageMapEntry {
key:string (key);
value:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage;
}