diff options
Diffstat (limited to 'php/tests/proto')
-rw-r--r-- | php/tests/proto/test.proto | 5 | ||||
-rw-r--r-- | php/tests/proto/test_descriptors.proto | 35 |
2 files changed, 40 insertions, 0 deletions
diff --git a/php/tests/proto/test.proto b/php/tests/proto/test.proto index d81f66f5..a90f3d1d 100644 --- a/php/tests/proto/test.proto +++ b/php/tests/proto/test.proto @@ -187,3 +187,8 @@ message TestRandomFieldOrder { int64 tag13 = 150; string tag14 = 160; } + +message TestReverseFieldOrder { + repeated int32 a = 2; + string b = 1; +} diff --git a/php/tests/proto/test_descriptors.proto b/php/tests/proto/test_descriptors.proto new file mode 100644 index 00000000..d42aec7c --- /dev/null +++ b/php/tests/proto/test_descriptors.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package descriptors; + +message TestDescriptorsMessage { + int32 optional_int32 = 1; + TestDescriptorsEnum optional_enum = 16; + Sub optional_message = 17; + + // Repeated + repeated int32 repeated_int32 = 31; + repeated Sub repeated_message = 47; + + oneof my_oneof { + int32 oneof_int32 = 51; + } + + map<int32, EnumSub> map_int32_enum = 71; + + message Sub { + int32 a = 1; + repeated int32 b = 2; + } + + enum EnumSub { + ZERO = 0; + ONE = 1; + } +} + +enum TestDescriptorsEnum { + ZERO = 0; + ONE = 1; +} + |