Index: third_party/protobuf/java/src/test/java/com/google/protobuf/lazy_fields_lite.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/lazy_fields_lite.proto |
similarity index 64% |
copy from third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto |
copy to third_party/protobuf/java/src/test/java/com/google/protobuf/lazy_fields_lite.proto |
index feecbef8d4a90961b35be988402e49e74fed313c..5580f72d990d7b73054cc27404bec9b378ebf3bf 100644 |
--- a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto |
+++ b/third_party/protobuf/java/src/test/java/com/google/protobuf/lazy_fields_lite.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 |
@@ -28,34 +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. |
-// Author: kenton@google.com (Kenton Varda) |
-// Based on original Protocol Buffers design by |
-// Sanjay Ghemawat, Jeff Dean, and others. |
+// Author: Naoki Iwasaki (niwasaki@google.com) |
// |
-// A proto file which uses optimize_for = CODE_SIZE. |
+// A proto file with lazy fields |
-import "google/protobuf/unittest.proto"; |
+syntax = "proto2"; |
package protobuf_unittest; |
-option optimize_for = CODE_SIZE; |
+option optimize_for = LITE_RUNTIME; |
-message TestOptimizedForSize { |
- optional int32 i = 1; |
- optional ForeignMessage msg = 19; |
+message LazyMessageLite { |
+ optional int32 num = 1; |
+ optional int32 num_with_default = 2 [default = 421]; |
+ optional LazyInnerMessageLite inner = 3 [lazy = true]; |
+ repeated LazyInnerMessageLite repeated_inner = 4 [lazy = true]; |
+ |
+ oneof oneof_field { |
+ int32 oneof_num = 5; |
+ LazyInnerMessageLite oneof_inner = 6 [lazy = true]; |
+ } |
+} |
+ |
+message LazyInnerMessageLite { |
+ optional int32 num = 1; |
+ optional int32 num_with_default = 2 [default = 42]; |
+ optional LazyNestedInnerMessageLite nested = 3 [lazy = true]; |
extensions 1000 to max; |
+} |
- extend TestOptimizedForSize { |
- optional int32 test_extension = 1234; |
- optional TestRequiredOptimizedForSize test_extension2 = 1235; |
+message LazyExtension { |
+ extend LazyInnerMessageLite { |
+ optional LazyExtension extension = 1000; |
} |
+ optional string name = 1; |
} |
-message TestRequiredOptimizedForSize { |
- required int32 x = 1; |
-} |
- |
-message TestOptionalOptimizedForSize { |
- optional TestRequiredOptimizedForSize o = 1; |
+message LazyNestedInnerMessageLite { |
+ optional int32 num = 1; |
+ optional int32 num_with_default = 2 [default = 4]; |
} |