diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-08-02 07:42:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-02 07:42:27 -0700 |
commit | c15a3269f9dea81db5a45b527cd8699f11b03f0b (patch) | |
tree | 9a824786160ee256544541361d71532850c097f5 /php/tests/proto | |
parent | be73938d72c91ff0075b1ed683f07922ad5801b0 (diff) | |
download | protobuf-c15a3269f9dea81db5a45b527cd8699f11b03f0b.tar.gz protobuf-c15a3269f9dea81db5a45b527cd8699f11b03f0b.tar.bz2 protobuf-c15a3269f9dea81db5a45b527cd8699f11b03f0b.zip |
Expose descriptor API in php c extension (#3422)
Diffstat (limited to 'php/tests/proto')
-rw-r--r-- | php/tests/proto/test_descriptors.proto | 35 |
1 files changed, 35 insertions, 0 deletions
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; +} + |