diff --git a/tests/prototest/test.golden b/tests/prototest/test.golden index cf861b9bb..eb10671b1 100644 --- a/tests/prototest/test.golden +++ b/tests/prototest/test.golden @@ -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 { diff --git a/tests/prototest/test.proto b/tests/prototest/test.proto index 45ce6c0e4..10e45aff8 100644 --- a/tests/prototest/test.proto +++ b/tests/prototest/test.proto @@ -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; } diff --git a/tests/prototest/test_include.golden b/tests/prototest/test_include.golden index 16b92ed8e..358c3f66e 100644 --- a/tests/prototest/test_include.golden +++ b/tests/prototest/test_include.golden @@ -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 { diff --git a/tests/prototest/test_suffix.golden b/tests/prototest/test_suffix.golden index 94ffd2675..a99f80739 100644 --- a/tests/prototest/test_suffix.golden +++ b/tests/prototest/test_suffix.golden @@ -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 { diff --git a/tests/prototest/test_union.golden b/tests/prototest/test_union.golden index 18270eb53..3e6becdc6 100644 --- a/tests/prototest/test_union.golden +++ b/tests/prototest/test_union.golden @@ -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; } diff --git a/tests/prototest/test_union_include.golden b/tests/prototest/test_union_include.golden index 1ce3ac303..abdb6e24e 100644 --- a/tests/prototest/test_union_include.golden +++ b/tests/prototest/test_union_include.golden @@ -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; } diff --git a/tests/prototest/test_union_suffix.golden b/tests/prototest/test_union_suffix.golden index 0b0f9203d..6a240c090 100644 --- a/tests/prototest/test_union_suffix.golden +++ b/tests/prototest/test_union_suffix.golden @@ -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; }