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 69% |
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..9a040145a66004de62025493d699dd4a2e10043f 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 |
@@ -29,33 +29,43 @@ |
// 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. |
-import "google/protobuf/unittest.proto"; |
-package protobuf_unittest; |
+// Some generic_services option(s) added automatically. |
+// See: http://go/proto2-generic-services-default |
+option java_generic_services = true; // auto-added |
-option optimize_for = CODE_SIZE; |
+import "google/protobuf/unittest.proto"; |
-message TestOptimizedForSize { |
- optional int32 i = 1; |
- optional ForeignMessage msg = 19; |
+package protobuf_unittest; |
- extensions 1000 to max; |
+option java_multiple_files = true; |
+option java_outer_classname = "MultipleFilesTestProto"; |
- 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; |
+} |
+ |
+enum EnumWithNoOuter { |
+ FOO = 1; |
+ BAR = 2; |
} |
-message TestRequiredOptimizedForSize { |
- required int32 x = 1; |
+service ServiceWithNoOuter { |
+ rpc Foo(MessageWithNoOuter) returns(TestAllTypes); |
} |
- |
-message TestOptionalOptimizedForSize { |
- optional TestRequiredOptimizedForSize o = 1; |
+ |
+extend TestAllExtensions { |
+ optional int32 extension_with_outer = 1234567; |
} |