Index: third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/com/google/protobuf/multiple_files_test.proto |
diff --git a/third_party/protobuf/js/test2.proto b/third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/com/google/protobuf/multiple_files_test.proto |
similarity index 64% |
copy from third_party/protobuf/js/test2.proto |
copy to third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/com/google/protobuf/multiple_files_test.proto |
index 44e55effcb47e983729f41a0b95f3e0f20497c05..9a040145a66004de62025493d699dd4a2e10043f 100644 |
--- a/third_party/protobuf/js/test2.proto |
+++ b/third_party/protobuf/java/compatibility_tests/v2.5.0/more_protos/src/proto/com/google/protobuf/multiple_files_test.proto |
@@ -1,6 +1,6 @@ |
// Protocol Buffers - Google's data interchange format |
// Copyright 2008 Google Inc. All rights reserved. |
-// https://developers.google.com/protocol-buffers/ |
+// http://code.google.com/p/protobuf/ |
// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
@@ -28,27 +28,44 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-syntax = "proto2"; |
+// Author: kenton@google.com (Kenton Varda) |
+// |
+// A proto file which tests the java_multiple_files option. |
+ |
+ |
+// Some generic_services option(s) added automatically. |
+// See: http://go/proto2-generic-services-default |
+option java_generic_services = true; // auto-added |
+ |
+import "google/protobuf/unittest.proto"; |
+ |
+package protobuf_unittest; |
-option java_package = "com.google.apps.jspb.proto"; |
option java_multiple_files = true; |
+option java_outer_classname = "MultipleFilesTestProto"; |
-package jspb.test; |
+message MessageWithNoOuter { |
+ message NestedMessage { |
+ optional int32 i = 1; |
+ } |
+ enum NestedEnum { |
+ BAZ = 3; |
+ } |
+ optional NestedMessage nested = 1; |
+ repeated TestAllTypes foreign = 2; |
+ optional NestedEnum nested_enum = 3; |
+ optional EnumWithNoOuter foreign_enum = 4; |
+} |
-message TestExtensionsMessage { |
- optional int32 intfield = 1; |
- extensions 100 to max; |
+enum EnumWithNoOuter { |
+ FOO = 1; |
+ BAR = 2; |
} |
-message ExtensionMessage { |
- extend TestExtensionsMessage { |
- optional ExtensionMessage ext_field = 100; |
- } |
- optional string ext1 = 1; |
+service ServiceWithNoOuter { |
+ rpc Foo(MessageWithNoOuter) returns(TestAllTypes); |
} |
-// Floating extensions are only supported when generating a _lib.js library. |
-extend TestExtensionsMessage { |
- optional ExtensionMessage floating_msg_field = 101; |
- optional string floating_str_field = 102; |
+extend TestAllExtensions { |
+ optional int32 extension_with_outer = 1234567; |
} |