mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 06:05:17 +00:00
update proto tests with alaised enum (#7121)
This commit is contained in:
@@ -10,6 +10,17 @@ enum ProtoEnum : int {
|
||||
BAR = 5,
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_.OtherMessage_;
|
||||
|
||||
enum ProtoEnum : int {
|
||||
NUL = 0,
|
||||
FOO = 1,
|
||||
BAR = 2,
|
||||
BAZ = 3,
|
||||
}
|
||||
|
||||
namespace proto.test;
|
||||
|
||||
table ImportedMessage {
|
||||
a:int;
|
||||
}
|
||||
@@ -39,6 +50,7 @@ table ProtoMessage {
|
||||
z:proto.test.ImportedMessage;
|
||||
/// doc comment for r.
|
||||
r:proto.test.ProtoMessage_.Anonymous0;
|
||||
outer_enum:proto.test.ProtoEnum;
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_;
|
||||
@@ -47,6 +59,7 @@ table OtherMessage {
|
||||
a:double;
|
||||
/// doc comment for b.
|
||||
b:float = 3.14149;
|
||||
foo_bar_baz:proto.test.ProtoMessage_.OtherMessage_.ProtoEnum;
|
||||
}
|
||||
|
||||
table Anonymous0 {
|
||||
|
||||
@@ -27,6 +27,16 @@ message ProtoMessage {
|
||||
optional double a = 26;
|
||||
/// doc comment for b.
|
||||
optional float b = 32 [default = 3.14149];
|
||||
|
||||
// Nested enum that aliases the outer one.
|
||||
enum ProtoEnum {
|
||||
NUL = 0;
|
||||
FOO = 1;
|
||||
BAR = 2;
|
||||
BAZ = 3;
|
||||
}
|
||||
|
||||
optional ProtoEnum foo_bar_baz = 33;
|
||||
}
|
||||
optional int32 c = 12 [default = 16];
|
||||
optional int64 d = 1 [default = 0];
|
||||
@@ -56,4 +66,5 @@ message ProtoMessage {
|
||||
/// lines.
|
||||
OtherMessage t = 18;
|
||||
}
|
||||
optional ProtoEnum outer_enum = 33;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,17 @@ enum ProtoEnum : int {
|
||||
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 {
|
||||
@@ -37,6 +48,7 @@ table ProtoMessage {
|
||||
z:proto.test.ImportedMessage;
|
||||
/// doc comment for r.
|
||||
r:proto.test.ProtoMessage_.Anonymous0;
|
||||
outer_enum:proto.test.ProtoEnum;
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_;
|
||||
@@ -45,6 +57,7 @@ table OtherMessage {
|
||||
a:double;
|
||||
/// doc comment for b.
|
||||
b:float = 3.14149;
|
||||
foo_bar_baz:proto.test.ProtoMessage_.OtherMessage_.ProtoEnum;
|
||||
}
|
||||
|
||||
table Anonymous0 {
|
||||
|
||||
@@ -10,6 +10,17 @@ enum ProtoEnum : int {
|
||||
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;
|
||||
}
|
||||
@@ -39,6 +50,7 @@ table ProtoMessage {
|
||||
z:proto.test.test_namespace_suffix.ImportedMessage;
|
||||
/// doc comment for r.
|
||||
r:proto.test.test_namespace_suffix.ProtoMessage_.Anonymous0;
|
||||
outer_enum:proto.test.test_namespace_suffix.ProtoEnum;
|
||||
}
|
||||
|
||||
namespace proto.test.test_namespace_suffix.ProtoMessage_;
|
||||
@@ -47,6 +59,7 @@ table OtherMessage {
|
||||
a:double;
|
||||
/// doc comment for b.
|
||||
b:float = 3.14149;
|
||||
foo_bar_baz:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage_.ProtoEnum;
|
||||
}
|
||||
|
||||
table Anonymous0 {
|
||||
|
||||
@@ -10,6 +10,15 @@ enum ProtoEnum : int {
|
||||
BAR = 5,
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_.OtherMessage_;
|
||||
|
||||
enum ProtoEnum : int {
|
||||
NUL = 0,
|
||||
FOO = 1,
|
||||
BAR = 2,
|
||||
BAZ = 3,
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_;
|
||||
|
||||
union RUnion {
|
||||
@@ -51,6 +60,7 @@ table ProtoMessage {
|
||||
z:proto.test.ImportedMessage;
|
||||
/// doc comment for r.
|
||||
r:proto.test.ProtoMessage_.RUnion;
|
||||
outer_enum:proto.test.ProtoEnum;
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_;
|
||||
@@ -59,5 +69,6 @@ table OtherMessage {
|
||||
a:double;
|
||||
/// doc comment for b.
|
||||
b:float = 3.14149;
|
||||
foo_bar_baz:proto.test.ProtoMessage_.OtherMessage_.ProtoEnum;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,15 @@ enum ProtoEnum : int {
|
||||
BAR = 5,
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_.OtherMessage_;
|
||||
|
||||
enum ProtoEnum : int {
|
||||
NUL = 0,
|
||||
FOO = 1,
|
||||
BAR = 2,
|
||||
BAZ = 3,
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_;
|
||||
|
||||
union RUnion {
|
||||
@@ -49,6 +58,7 @@ table ProtoMessage {
|
||||
z:proto.test.ImportedMessage;
|
||||
/// doc comment for r.
|
||||
r:proto.test.ProtoMessage_.RUnion;
|
||||
outer_enum:proto.test.ProtoEnum;
|
||||
}
|
||||
|
||||
namespace proto.test.ProtoMessage_;
|
||||
@@ -57,5 +67,6 @@ table OtherMessage {
|
||||
a:double;
|
||||
/// doc comment for b.
|
||||
b:float = 3.14149;
|
||||
foo_bar_baz:proto.test.ProtoMessage_.OtherMessage_.ProtoEnum;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,15 @@ enum ProtoEnum : int {
|
||||
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.ProtoMessage_;
|
||||
|
||||
union RUnion {
|
||||
@@ -51,6 +60,7 @@ table ProtoMessage {
|
||||
z:proto.test.test_namespace_suffix.ImportedMessage;
|
||||
/// doc comment for r.
|
||||
r:proto.test.test_namespace_suffix.ProtoMessage_.RUnion;
|
||||
outer_enum:proto.test.test_namespace_suffix.ProtoEnum;
|
||||
}
|
||||
|
||||
namespace proto.test.test_namespace_suffix.ProtoMessage_;
|
||||
@@ -59,5 +69,6 @@ table OtherMessage {
|
||||
a:double;
|
||||
/// doc comment for b.
|
||||
b:float = 3.14149;
|
||||
foo_bar_baz:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage_.ProtoEnum;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user