| Index: third_party/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_import.proto
|
| diff --git a/third_party/protobuf/src/google/protobuf/map_proto2_unittest.proto b/third_party/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_import.proto
|
| similarity index 67%
|
| copy from third_party/protobuf/src/google/protobuf/map_proto2_unittest.proto
|
| copy to third_party/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_import.proto
|
| index 916cc54637538cb4e4a28b7c617dcbebd4b846a5..c115b11171afaa03d7ee6aeedc7506689cfd7038 100644
|
| --- a/third_party/protobuf/src/google/protobuf/map_proto2_unittest.proto
|
| +++ b/third_party/protobuf/java/compatibility_tests/v2.5.0/protos/src/proto/google/protobuf/unittest_import.proto
|
| @@ -1,6 +1,6 @@
|
| // Protocol Buffers - Google's data interchange format
|
| // Copyright 2008 Google Inc. All rights reserved.
|
| -// https://developers.google.com/protocol-buffers/
|
| +// http://code.google.com/p/protobuf/
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -28,39 +28,37 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -syntax = "proto2";
|
| -
|
| +// 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.
|
|
|
| -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 map_test_util.h we do "using namespace unittest = protobuf_unittest".
|
| -package protobuf_unittest;
|
| +// In test_util.h we do
|
| +// "using namespace unittest_import = protobuf_unittest_import".
|
| +package protobuf_unittest_import;
|
|
|
| -enum Proto2MapEnum {
|
| - PROTO2_MAP_ENUM_FOO = 0;
|
| - PROTO2_MAP_ENUM_BAR = 1;
|
| - PROTO2_MAP_ENUM_BAZ = 2;
|
| -}
|
| +option optimize_for = SPEED;
|
|
|
| -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;
|
| -}
|
| +// Excercise the java_package option.
|
| +option java_package = "com.google.protobuf.test";
|
|
|
| -message TestEnumMap {
|
| - map<int32, Proto2MapEnum> known_map_field = 101;
|
| - map<int32, Proto2MapEnum> unknown_map_field = 102;
|
| -}
|
| +// Do not set a java_outer_classname here to verify that Proto2 works without
|
| +// one.
|
| +
|
| +// Test public import
|
| +import public "google/protobuf/unittest_import_public.proto";
|
|
|
| -message TestEnumMapPlusExtra {
|
| - map<int32, Proto2MapEnumPlusExtra> known_map_field = 101;
|
| - map<int32, Proto2MapEnumPlusExtra> unknown_map_field = 102;
|
| +message ImportMessage {
|
| + optional int32 d = 1;
|
| }
|
|
|
| -message TestImportEnumMap {
|
| - map<int32, protobuf_unittest_import.ImportEnumForMap> import_enum_amp = 1;
|
| +enum ImportEnum {
|
| + IMPORT_FOO = 7;
|
| + IMPORT_BAR = 8;
|
| + IMPORT_BAZ = 9;
|
| }
|
| +
|
|
|