syntax = "proto3"; // These proto descriptors have at one time been reported as an issue or defect. // They are kept here to replicate the issue, and continue to verify the fix. // Issue: Non-"Google.Protobuffers" namespace will ensure that protobuffer library types are qualified option csharp_namespace = "UnitTest.Issues.TestProtos"; package unittest_issues; option optimize_for = SPEED; // Issue 307: when generating doubly-nested types, any references // should be of the form A.Types.B.Types.C. message Issue307 { message NestedOnce { message NestedTwice { } } } // Old issue 13: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=13 // New issue 309: https://github.com/google/protobuf/issues/309 // message A { // optional int32 _A = 1; // } // message B { // optional int32 B_ = 1; // } //message AB { // optional int32 a_b = 1; //} // Similar issue with numeric names // Java code failed too, so probably best for this to be a restriction. // See https://github.com/google/protobuf/issues/308 // message NumberField { // optional int32 _01 = 1; // } // issue 19 - negative enum values enum NegativeEnum { NEGATIVE_ENUM_ZERO = 0; FiveBelow = -5; MinusOne = -1; } message NegativeEnumMessage { NegativeEnum value = 1; repeated NegativeEnum values = 2 [packed = false]; repeated NegativeEnum packed_values = 3 [packed=true]; } // Issue 21: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=21 // Decorate fields with [deprecated=true] as [System.Obsolete] message DeprecatedChild { } enum DeprecatedEnum { DEPRECATED_ZERO = 0; one = 1; } message DeprecatedFieldsMessage { int32 PrimitiveValue = 1 [deprecated = true]; repeated int32 PrimitiveArray = 2 [deprecated = true]; DeprecatedChild MessageValue = 3 [deprecated = true]; repeated DeprecatedChild MessageArray = 4 [deprecated = true]; DeprecatedEnum EnumValue = 5 [deprecated = true]; repeated DeprecatedEnum EnumArray = 6 [deprecated = true]; } // Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=45 message ItemField { int32 item = 1; }