Commit ccb76fff authored by Jie Luo's avatar Jie Luo

Add Oneof custom options test

parent 5af0b547
...@@ -68,10 +68,9 @@ extend google.protobuf.FieldOptions { ...@@ -68,10 +68,9 @@ extend google.protobuf.FieldOptions {
fixed64 field_opt1 = 7740936; fixed64 field_opt1 = 7740936;
} }
// See https://github.com/google/protobuf/issues/2316 extend google.protobuf.OneofOptions {
// extend google.protobuf.OneofOptions { int32 oneof_opt1 = 7740111;
// int32 oneof_opt1 = 7740111; }
// }
extend google.protobuf.EnumOptions { extend google.protobuf.EnumOptions {
sfixed32 enum_opt1 = 7753576; sfixed32 enum_opt1 = 7753576;
...@@ -106,8 +105,7 @@ message TestMessageWithCustomOptions { ...@@ -106,8 +105,7 @@ message TestMessageWithCustomOptions {
(field_opt1)=8765432109]; (field_opt1)=8765432109];
oneof AnOneof { oneof AnOneof {
// See https://github.com/google/protobuf/issues/2316 option (oneof_opt1) = -99;
// option (oneof_opt1) = -99;
int32 oneof_field = 2; int32 oneof_field = 2;
} }
......
...@@ -50,6 +50,7 @@ namespace Google.Protobuf.Test.Reflection ...@@ -50,6 +50,7 @@ namespace Google.Protobuf.Test.Reflection
FileOpt1 = 7736974, FileOpt1 = 7736974,
MessageOpt1 = 7739036, MessageOpt1 = 7739036,
FieldOpt1 = 7740936, FieldOpt1 = 7740936,
OneofOpt1 = 7740111,
EnumOpt1 = 7753576, EnumOpt1 = 7753576,
EnumValueOpt1 = 1560678, EnumValueOpt1 = 1560678,
ServiceOpt1 = 7887650, ServiceOpt1 = 7887650,
...@@ -197,6 +198,9 @@ namespace Google.Protobuf.Test.Reflection ...@@ -197,6 +198,9 @@ namespace Google.Protobuf.Test.Reflection
var fieldOptions = TestMessageWithCustomOptions.Descriptor.Fields["field1"] .CustomOptions; var fieldOptions = TestMessageWithCustomOptions.Descriptor.Fields["field1"] .CustomOptions;
AssertOption(8765432109UL, fieldOptions.TryGetFixed64, FieldOpt1); AssertOption(8765432109UL, fieldOptions.TryGetFixed64, FieldOpt1);
var oneofOptions = TestMessageWithCustomOptions.Descriptor.Oneofs[0].CustomOptions;
AssertOption(-99, oneofOptions.TryGetInt32, OneofOpt1);
var enumOptions = TestMessageWithCustomOptions.Descriptor.EnumTypes[0].CustomOptions; var enumOptions = TestMessageWithCustomOptions.Descriptor.EnumTypes[0].CustomOptions;
AssertOption(-789, enumOptions.TryGetSFixed32, EnumOpt1); AssertOption(-789, enumOptions.TryGetSFixed32, EnumOpt1);
......
...@@ -24,115 +24,117 @@ namespace UnitTest.Issues.TestProtos { ...@@ -24,115 +24,117 @@ namespace UnitTest.Issues.TestProtos {
string.Concat( string.Concat(
"CiR1bml0dGVzdF9jdXN0b21fb3B0aW9uc19wcm90bzMucHJvdG8SEXByb3Rv", "CiR1bml0dGVzdF9jdXN0b21fb3B0aW9uc19wcm90bzMucHJvdG8SEXByb3Rv",
"YnVmX3VuaXR0ZXN0GiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90", "YnVmX3VuaXR0ZXN0GiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90",
"byLHAQocVGVzdE1lc3NhZ2VXaXRoQ3VzdG9tT3B0aW9ucxIeCgZmaWVsZDEY", "byLXAQocVGVzdE1lc3NhZ2VXaXRoQ3VzdG9tT3B0aW9ucxIeCgZmaWVsZDEY",
"ASABKAlCDggBweDDHS3hdQoCAAAAEhUKC29uZW9mX2ZpZWxkGAIgASgFSAAi", "ASABKAlCDggBweDDHS3hdQoCAAAAEhUKC29uZW9mX2ZpZWxkGAIgASgFSAAi",
"UwoGQW5FbnVtEhYKEkFORU5VTV9VTlNQRUNJRklFRBAAEg8KC0FORU5VTV9W", "UwoGQW5FbnVtEhYKEkFORU5VTV9VTlNQRUNJRklFRBAAEg8KC0FORU5VTV9W",
"QUwxEAESFgoLQU5FTlVNX1ZBTDIQAhoFsIb6BXsaCMX2yR3r/P//OhAIAODp", "QUwxEAESFgoLQU5FTlVNX1ZBTDIQAhoFsIb6BXsaCMX2yR3r/P//OhAIAODp",
"wh3I//////////8BQgkKB0FuT25lb2YiGAoWQ3VzdG9tT3B0aW9uRm9vUmVx", "wh3I//////////8BQhkKB0FuT25lb2YSDviswx2d//////////8BIhgKFkN1",
"dWVzdCIZChdDdXN0b21PcHRpb25Gb29SZXNwb25zZSIeChxDdXN0b21PcHRp", "c3RvbU9wdGlvbkZvb1JlcXVlc3QiGQoXQ3VzdG9tT3B0aW9uRm9vUmVzcG9u",
"b25Gb29DbGllbnRNZXNzYWdlIh4KHEN1c3RvbU9wdGlvbkZvb1NlcnZlck1l", "c2UiHgocQ3VzdG9tT3B0aW9uRm9vQ2xpZW50TWVzc2FnZSIeChxDdXN0b21P",
"c3NhZ2UijwEKGkR1bW15TWVzc2FnZUNvbnRhaW5pbmdFbnVtInEKDFRlc3RF", "cHRpb25Gb29TZXJ2ZXJNZXNzYWdlIo8BChpEdW1teU1lc3NhZ2VDb250YWlu",
"bnVtVHlwZRIgChxURVNUX09QVElPTl9FTlVNX1VOU1BFQ0lGSUVEEAASGgoW", "aW5nRW51bSJxCgxUZXN0RW51bVR5cGUSIAocVEVTVF9PUFRJT05fRU5VTV9V",
"VEVTVF9PUFRJT05fRU5VTV9UWVBFMRAWEiMKFlRFU1RfT1BUSU9OX0VOVU1f", "TlNQRUNJRklFRBAAEhoKFlRFU1RfT1BUSU9OX0VOVU1fVFlQRTEQFhIjChZU",
"VFlQRTIQ6f//////////ASIhCh9EdW1teU1lc3NhZ2VJbnZhbGlkQXNPcHRp", "RVNUX09QVElPTl9FTlVNX1RZUEUyEOn//////////wEiIQofRHVtbXlNZXNz",
"b25UeXBlIooBChxDdXN0b21PcHRpb25NaW5JbnRlZ2VyVmFsdWVzOmrQ3rId", "YWdlSW52YWxpZEFzT3B0aW9uVHlwZSKKAQocQ3VzdG9tT3B0aW9uTWluSW50",
"AOjGsh2AgICA+P////8BsLyyHYCAgICAgICAgAGAk7IdAPj1sB0AgMSwHf//", "ZWdlclZhbHVlczpq0N6yHQDoxrIdgICAgPj/////AbC8sh2AgICAgICAgIAB",
"//8P+JewHf///////////wGd9a8dAAAAAJHurx0AAAAAAAAAAK2Nrx0AAACA", "gJOyHQD49bAdAIDEsB3/////D/iXsB3///////////8BnfWvHQAAAACR7q8d",
"mdaoHQAAAAAAAACAIpEBChxDdXN0b21PcHRpb25NYXhJbnRlZ2VyVmFsdWVz", "AAAAAAAAAACtja8dAAAAgJnWqB0AAAAAAAAAgCKRAQocQ3VzdG9tT3B0aW9u",
"OnHQ3rIdAejGsh3/////B7C8sh3//////////3+Ak7Id/////w/49bAd////", "TWF4SW50ZWdlclZhbHVlczpx0N6yHQHoxrId/////wewvLId//////////9/",
"////////AYDEsB3+////D/iXsB3+//////////8BnfWvHf////+R7q8d////", "gJOyHf////8P+PWwHf///////////wGAxLAd/v///w/4l7Ad/v//////////",
"//////+tja8d////f5nWqB3/////////fyJuChdDdXN0b21PcHRpb25PdGhl", "AZ31rx3/////ke6vHf//////////rY2vHf///3+Z1qgd/////////38ibgoX",
"clZhbHVlczpT6MayHZz//////////wH136Md54dFQencoh37WYxCysDzP6rc", "Q3VzdG9tT3B0aW9uT3RoZXJWYWx1ZXM6U+jGsh2c//////////8B9d+jHeeH",
"oh0OSGVsbG8sICJXb3JsZCKy2aIdC0hlbGxvAFdvcmxkiNmiHen/////////", "RUHp3KId+1mMQsrA8z+q3KIdDkhlbGxvLCAiV29ybGQistmiHQtIZWxsbwBX",
"/wEiNAocU2V0dGluZ1JlYWxzRnJvbVBvc2l0aXZlSW50czoU9d+jHQAAQEHp", "b3JsZIjZoh3p//////////8BIjQKHFNldHRpbmdSZWFsc0Zyb21Qb3NpdGl2",
"3KIdAAAAAABAY0AiNAocU2V0dGluZ1JlYWxzRnJvbU5lZ2F0aXZlSW50czoU", "ZUludHM6FPXfox0AAEBB6dyiHQAAAAAAQGNAIjQKHFNldHRpbmdSZWFsc0Zy",
"9d+jHQAAQMHp3KIdAAAAAABAY8AiSwoSQ29tcGxleE9wdGlvblR5cGUxEgsK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/DowR3qrcDlJPrshTsqCGQSDkZpbGVBbm5vdGF0aW9uGhYSFE5lc3Rl", "aW9ucxiJ6bIHIAEoCzIcLnByb3RvYnVmX3VuaXR0ZXN0LkFnZ3JlZ2F0ZUJV",
"ZEZpbGVBbm5vdGF0aW9uYgZwcm90bzM=")); "qgIaVW5pdFRlc3QuSXNzdWVzLlRlc3RQcm90b3Pw6MEd6q3A5ST67IU7Kghk",
"Eg5GaWxlQW5ub3RhdGlvbhoWEhROZXN0ZWRGaWxlQW5ub3RhdGlvbmIGcHJv",
"dG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { pbr::FileDescriptor.DescriptorProtoFileDescriptor, }, new pbr::FileDescriptor[] { pbr::FileDescriptor.DescriptorProtoFileDescriptor, },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.MethodOpt1), typeof(global::UnitTest.Issues.TestProtos.AggregateEnum), }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(new[] {typeof(global::UnitTest.Issues.TestProtos.MethodOpt1), typeof(global::UnitTest.Issues.TestProtos.AggregateEnum), }, new pbr::GeneratedClrTypeInfo[] {
...@@ -230,10 +232,6 @@ namespace UnitTest.Issues.TestProtos { ...@@ -230,10 +232,6 @@ namespace UnitTest.Issues.TestProtos {
/// <summary>Field number for the "oneof_field" field.</summary> /// <summary>Field number for the "oneof_field" field.</summary>
public const int OneofFieldFieldNumber = 2; public const int OneofFieldFieldNumber = 2;
/// <summary>
/// See https://github.com/google/protobuf/issues/2316
/// option (oneof_opt1) = -99;
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int OneofField { public int OneofField {
get { return anOneofCase_ == AnOneofOneofCase.OneofField ? (int) anOneof_ : 0; } get { return anOneofCase_ == AnOneofOneofCase.OneofField ? (int) anOneof_ : 0; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment