Index: third_party/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto |
diff --git a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto b/third_party/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto |
similarity index 62% |
copy from third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto |
copy to third_party/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto |
index feecbef8d4a90961b35be988402e49e74fed313c..92790506f022cbdc16f53b27442b17d5be26eae3 100644 |
--- a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto |
+++ b/third_party/protobuf/java/src/test/java/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. |
-// http://code.google.com/p/protobuf/ |
+// https://developers.google.com/protocol-buffers/ |
// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
@@ -29,33 +29,50 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// Author: kenton@google.com (Kenton Varda) |
-// Based on original Protocol Buffers design by |
-// Sanjay Ghemawat, Jeff Dean, and others. |
// |
-// A proto file which uses optimize_for = CODE_SIZE. |
+// A proto file which tests the java_multiple_files option. |
+ |
+syntax = "proto2"; |
+ |
+// 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"; |
+import "google/protobuf/descriptor.proto"; |
package protobuf_unittest; |
-option optimize_for = CODE_SIZE; |
- |
-message TestOptimizedForSize { |
- optional int32 i = 1; |
- optional ForeignMessage msg = 19; |
+option java_multiple_files = true; |
+option java_outer_classname = "MultipleFilesTestProto"; |
- extensions 1000 to max; |
- extend TestOptimizedForSize { |
- optional int32 test_extension = 1234; |
- optional TestRequiredOptimizedForSize test_extension2 = 1235; |
+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 TestRequiredOptimizedForSize { |
- required int32 x = 1; |
+extend google.protobuf.EnumValueOptions { |
+ optional int32 enum_value_option = 7654321; |
} |
- |
-message TestOptionalOptimizedForSize { |
- optional TestRequiredOptimizedForSize o = 1; |
+ |
+enum EnumWithNoOuter { |
+ FOO = 1 [(enum_value_option) = 12345]; |
+ BAR = 2; |
+} |
+ |
+service ServiceWithNoOuter { |
+ rpc Foo(MessageWithNoOuter) returns(TestAllTypes); |
+} |
+ |
+extend TestAllExtensions { |
+ optional int32 extension_with_outer = 1234567; |
} |