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

Unified Diff: third_party/protobuf/src/google/protobuf/map_proto2_unittest.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/src/google/protobuf/map_proto2_unittest.proto
diff --git a/third_party/protobuf/src/google/protobuf/unittest_import.proto b/third_party/protobuf/src/google/protobuf/map_proto2_unittest.proto
similarity index 67%
copy from third_party/protobuf/src/google/protobuf/unittest_import.proto
copy to third_party/protobuf/src/google/protobuf/map_proto2_unittest.proto
index c115b11171afaa03d7ee6aeedc7506689cfd7038..916cc54637538cb4e4a28b7c617dcbebd4b846a5 100644
--- a/third_party/protobuf/src/google/protobuf/unittest_import.proto
+++ b/third_party/protobuf/src/google/protobuf/map_proto2_unittest.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,37 +28,39 @@
// (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 is imported by unittest.proto to test importing.
+syntax = "proto2";
+
+import "google/protobuf/unittest_import.proto";
// We don't put this in a package within proto2 because we need to make sure
// that the generated code doesn't depend on being in the proto2 namespace.
-// In test_util.h we do
-// "using namespace unittest_import = protobuf_unittest_import".
-package protobuf_unittest_import;
-
-option optimize_for = SPEED;
-
-// Excercise the java_package option.
-option java_package = "com.google.protobuf.test";
+// In map_test_util.h we do "using namespace unittest = protobuf_unittest".
+package protobuf_unittest;
-// Do not set a java_outer_classname here to verify that Proto2 works without
-// one.
+enum Proto2MapEnum {
+ PROTO2_MAP_ENUM_FOO = 0;
+ PROTO2_MAP_ENUM_BAR = 1;
+ PROTO2_MAP_ENUM_BAZ = 2;
+}
-// Test public import
-import public "google/protobuf/unittest_import_public.proto";
+enum Proto2MapEnumPlusExtra {
+ E_PROTO2_MAP_ENUM_FOO = 0;
+ E_PROTO2_MAP_ENUM_BAR = 1;
+ E_PROTO2_MAP_ENUM_BAZ = 2;
+ E_PROTO2_MAP_ENUM_EXTRA = 3;
+}
-message ImportMessage {
- optional int32 d = 1;
+message TestEnumMap {
+ map<int32, Proto2MapEnum> known_map_field = 101;
+ map<int32, Proto2MapEnum> unknown_map_field = 102;
}
-enum ImportEnum {
- IMPORT_FOO = 7;
- IMPORT_BAR = 8;
- IMPORT_BAZ = 9;
+message TestEnumMapPlusExtra {
+ map<int32, Proto2MapEnumPlusExtra> known_map_field = 101;
+ map<int32, Proto2MapEnumPlusExtra> unknown_map_field = 102;
}
+message TestImportEnumMap {
+ map<int32, protobuf_unittest_import.ImportEnumForMap> import_enum_amp = 1;
+}
« no previous file with comments | « third_party/protobuf/src/google/protobuf/map_lite_unittest.proto ('k') | third_party/protobuf/src/google/protobuf/map_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698