diff options
author | Adam Cozzette <acozzette@google.com> | 2017-04-27 14:55:53 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-04-27 14:55:53 -0700 |
commit | 9053033a5076f82cf18b823c31f352e95e5bfd8d (patch) | |
tree | 1d2a2611f56e786d7c3e40b8fd1b2e3d9aff9025 /php/tests/proto | |
parent | 067b1eec3bf852abaad0844999461baff8a5fdc8 (diff) | |
parent | a6189acd18b00611c1dc7042299ad75486f08a1a (diff) | |
download | protobuf-9053033a5076f82cf18b823c31f352e95e5bfd8d.tar.gz protobuf-9053033a5076f82cf18b823c31f352e95e5bfd8d.tar.bz2 protobuf-9053033a5076f82cf18b823c31f352e95e5bfd8d.zip |
Merge remote-tracking branch 'remotes/google/3.3.x' into merge-3.3-to-master
Diffstat (limited to 'php/tests/proto')
-rw-r--r-- | php/tests/proto/test.proto | 23 | ||||
-rw-r--r-- | php/tests/proto/test_import_descriptor_proto.proto | 14 | ||||
-rw-r--r-- | php/tests/proto/test_no_namespace.proto | 10 | ||||
-rw-r--r-- | php/tests/proto/test_prefix.proto | 5 |
4 files changed, 50 insertions, 2 deletions
diff --git a/php/tests/proto/test.proto b/php/tests/proto/test.proto index 1a47a3f2..39229254 100644 --- a/php/tests/proto/test.proto +++ b/php/tests/proto/test.proto @@ -1,6 +1,7 @@ syntax = "proto3"; import 'proto/test_include.proto'; +import 'proto/test_no_namespace.proto'; import 'proto/test_prefix.proto'; package foo; @@ -96,12 +97,34 @@ message TestMessage { // Reserved for non-existing field test. // int32 non_exist = 89; + + NoNamespaceMessage optional_no_namespace_message = 91; + NoNamespaceEnum optional_no_namespace_enum = 92; + repeated NoNamespaceMessage repeated_no_namespace_message = 93; + repeated NoNamespaceEnum repeated_no_namespace_enum = 94; + + enum NestedEnum { + ZERO = 0; + } + + NestedEnum optional_nested_enum = 101; + + // Test prefix for reserved words. + message Empty { + int32 a = 1; + } } enum TestEnum { ZERO = 0; ONE = 1; TWO = 2; + ECHO = 3; // Test reserved name. +} + +// Test prefix for reserved words. +message Empty { + int32 a = 1; } message TestPackedMessage { diff --git a/php/tests/proto/test_import_descriptor_proto.proto b/php/tests/proto/test_import_descriptor_proto.proto new file mode 100644 index 00000000..2a19940d --- /dev/null +++ b/php/tests/proto/test_import_descriptor_proto.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +import "google/protobuf/descriptor.proto"; + +message TestImportDescriptorProto { + extend google.protobuf.MethodOptions { + int32 a = 72295727; + } +} + +extend google.protobuf.MethodOptions { + int32 a = 72295728; +} + diff --git a/php/tests/proto/test_no_namespace.proto b/php/tests/proto/test_no_namespace.proto index b8c4fdf2..58f13d47 100644 --- a/php/tests/proto/test_no_namespace.proto +++ b/php/tests/proto/test_no_namespace.proto @@ -1,10 +1,16 @@ syntax = "proto3"; -message NoNameSpaceMessage { +message NoNamespaceMessage { int32 a = 1; + + enum NestedEnum { + ZERO = 0; + } + NestedEnum b = 2; + repeated NestedEnum c = 3; } -enum NoNameSpaceEnum { +enum NoNamespaceEnum { VALUE_A = 0; VALUE_B = 1; } diff --git a/php/tests/proto/test_prefix.proto b/php/tests/proto/test_prefix.proto index 04582121..9bfbad7f 100644 --- a/php/tests/proto/test_prefix.proto +++ b/php/tests/proto/test_prefix.proto @@ -5,3 +5,8 @@ option php_class_prefix = "Prefix"; message TestPrefix { int32 a = 1; } + +// Test prefix for reserved words. +message Empty { + int32 a = 1; +} |