mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 07:20:03 +00:00
* 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>
This commit is contained in:
85
tests/prototest/test_include.golden.fbs
Normal file
85
tests/prototest/test_include.golden.fbs
Normal file
@@ -0,0 +1,85 @@
|
||||
// Generated from test.proto
|
||||
|
||||
include "imported.fbs";
|
||||
|
||||
namespace proto.test;
|
||||
|
||||
/// Enum doc comment.
|
||||
enum ProtoEnum : int {
|
||||
NUL = 0,
|
||||
FOO = 1,
|
||||
/// Enum 2nd value doc comment misaligned.
|
||||
BAR = 5,
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_.OtherMessage_;
|
||||
|
||||
enum ProtoEnum : int {
|
||||
NUL = 0,
|
||||
FOO = 1,
|
||||
BAR = 2,
|
||||
BAZ = 3,
|
||||
}
|
||||
|
||||
namespace proto.test;
|
||||
|
||||
/// 2nd table doc comment with
|
||||
/// many lines.
|
||||
table ProtoMessage {
|
||||
c:int = 16;
|
||||
d:long;
|
||||
p:uint;
|
||||
e:ulong;
|
||||
/// doc comment for f.
|
||||
f:int = -1;
|
||||
g:long;
|
||||
h:uint;
|
||||
q:ulong;
|
||||
i:int;
|
||||
j:long;
|
||||
/// doc comment for k.
|
||||
k:bool;
|
||||
/// doc comment for l on 2
|
||||
/// lines
|
||||
l:string (required);
|
||||
m:[ubyte];
|
||||
n:proto.test.ProtoMessage_.OtherMessage;
|
||||
o:[string];
|
||||
z:proto.test.ImportedMessage;
|
||||
/// doc comment for r.
|
||||
r:proto.test.ProtoMessage_.Anonymous0;
|
||||
outer_enum:proto.test.ProtoEnum;
|
||||
u:float = +inf;
|
||||
v:float = +inf;
|
||||
w:float = -inf;
|
||||
grades:[proto.test.ProtoMessage_.GradesEntry];
|
||||
other_message_map:[proto.test.ProtoMessage_.OtherMessageMapEntry];
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_;
|
||||
|
||||
table OtherMessage {
|
||||
a:double;
|
||||
/// doc comment for b.
|
||||
b:float = 3.14149;
|
||||
foo_bar_baz:proto.test.ProtoMessage_.OtherMessage_.ProtoEnum;
|
||||
}
|
||||
|
||||
table Anonymous0 {
|
||||
/// doc comment for s.
|
||||
s:proto.test.ImportedMessage;
|
||||
/// doc comment for t on 2
|
||||
/// lines.
|
||||
t:proto.test.ProtoMessage_.OtherMessage;
|
||||
}
|
||||
|
||||
table GradesEntry {
|
||||
key:string (key);
|
||||
value:float;
|
||||
}
|
||||
|
||||
table OtherMessageMapEntry {
|
||||
key:string (key);
|
||||
value:proto.test.ProtoMessage_.OtherMessage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user