| Index: third_party/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto
|
| diff --git a/third_party/protobuf/src/google/protobuf/unittest_import_lite.proto b/third_party/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto
|
| similarity index 60%
|
| copy from third_party/protobuf/src/google/protobuf/unittest_import_lite.proto
|
| copy to third_party/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto
|
| index ebaab5c05e21f1e0caefa89bdfcb325b4aaefbd7..9610e9d5cd1753e985d7eef2556f3725ee0fecc5 100644
|
| --- a/third_party/protobuf/src/google/protobuf/unittest_import_lite.proto
|
| +++ b/third_party/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto
|
| @@ -28,22 +28,63 @@
|
| // (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)
|
| -//
|
| -// This is like unittest_import.proto but with optimize_for = LITE_RUNTIME.
|
| +// Author: jonp@google.com (Jon Perlow)
|
| +
|
| +// This file tests that various identifiers work as field and type names even
|
| +// though the same identifiers are used internally by the java code generator.
|
| +
|
|
|
| -package protobuf_unittest_import;
|
| +// Some generic_services option(s) added automatically.
|
| +// See: http://go/proto2-generic-services-default
|
| +option java_generic_services = true; // auto-added
|
|
|
| -option optimize_for = LITE_RUNTIME;
|
| +package io_protocol_tests;
|
|
|
| option java_package = "com.google.protobuf";
|
| +option java_outer_classname = "TestBadIdentifiersProto";
|
| +
|
| +message TestMessage {
|
| +}
|
| +
|
| +message Deprecated {
|
| + enum TestEnum {
|
| + FOO = 1;
|
| + }
|
|
|
| -message ImportMessageLite {
|
| - optional int32 d = 1;
|
| + optional int32 field1 = 1 [deprecated=true];
|
| + optional TestEnum field2 = 2 [deprecated=true];
|
| + optional TestMessage field3 = 3 [deprecated=true];
|
| }
|
|
|
| -enum ImportEnumLite {
|
| - IMPORT_LITE_FOO = 7;
|
| - IMPORT_LITE_BAR = 8;
|
| - IMPORT_LITE_BAZ = 9;
|
| +message Override {
|
| + optional int32 override = 1;
|
| }
|
| +
|
| +message Object {
|
| + optional int32 object = 1;
|
| +}
|
| +
|
| +message String {
|
| + optional string string = 1;
|
| +}
|
| +
|
| +message Integer {
|
| + optional int32 integer = 1;
|
| +}
|
| +
|
| +message Long {
|
| + optional int32 long = 1;
|
| +}
|
| +
|
| +message Float {
|
| + optional float float = 1;
|
| +}
|
| +
|
| +message Double {
|
| + optional double double = 1;
|
| +}
|
| +
|
| +service TestConflictingMethodNames {
|
| + rpc Override(TestMessage) returns (TestMessage);
|
| +}
|
| +
|
|
|