Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Unified Diff: third_party/protobuf/objectivec/Tests/unittest_cycle.proto

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/objectivec/Tests/unittest_cycle.proto
diff --git a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto b/third_party/protobuf/objectivec/Tests/unittest_cycle.proto
similarity index 67%
copy from third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto
copy to third_party/protobuf/objectivec/Tests/unittest_cycle.proto
index feecbef8d4a90961b35be988402e49e74fed313c..5f6f56a1aee1d91b3db2cc2b5cc45192734596bc 100644
--- a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto
+++ b/third_party/protobuf/objectivec/Tests/unittest_cycle.proto
@@ -1,6 +1,5 @@
// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
+// Copyright 2015 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -28,34 +27,32 @@
// (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.
-//
-// A proto file which uses optimize_for = CODE_SIZE.
-
-import "google/protobuf/unittest.proto";
+syntax = "proto2";
package protobuf_unittest;
-option optimize_for = CODE_SIZE;
+// Cycles in the Message graph can cause problems for the mutable classes
+// since the properties on the mutable class change types. This file just
+// needs to generate source, and that source must compile, to ensure the
+// generated source works for this sort of case.
-message TestOptimizedForSize {
- optional int32 i = 1;
- optional ForeignMessage msg = 19;
+// You can't make a object graph that spans files, so this can only be done
+// within a single proto file.
- extensions 1000 to max;
-
- extend TestOptimizedForSize {
- optional int32 test_extension = 1234;
- optional TestRequiredOptimizedForSize test_extension2 = 1235;
- }
+message CycleFoo {
+ optional CycleFoo a_foo = 1;
+ optional CycleBar a_bar = 2;
+ optional CycleBaz a_baz = 3;
}
-message TestRequiredOptimizedForSize {
- required int32 x = 1;
+message CycleBar {
+ optional CycleBar a_bar = 1;
+ optional CycleBaz a_baz = 2;
+ optional CycleFoo a_foo = 3;
}
-
-message TestOptionalOptimizedForSize {
- optional TestRequiredOptimizedForSize o = 1;
+
+message CycleBaz {
+ optional CycleBaz a_baz = 1;
+ optional CycleFoo a_foo = 2;
+ optional CycleBar a_bar = 3;
}

Powered by Google App Engine
This is Rietveld 408576698