From ccb76fff445862ac11bf7980818d587030f1c7d9 Mon Sep 17 00:00:00 2001 From: Jie Luo Date: Fri, 27 Jan 2017 11:45:31 -0800 Subject: Add Oneof custom options test --- csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'csharp/src/Google.Protobuf.Test/Reflection') diff --git a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs index b662e8b0..68b4d6af 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs @@ -50,6 +50,7 @@ namespace Google.Protobuf.Test.Reflection FileOpt1 = 7736974, MessageOpt1 = 7739036, FieldOpt1 = 7740936, + OneofOpt1 = 7740111, EnumOpt1 = 7753576, EnumValueOpt1 = 1560678, ServiceOpt1 = 7887650, @@ -197,6 +198,9 @@ namespace Google.Protobuf.Test.Reflection var fieldOptions = TestMessageWithCustomOptions.Descriptor.Fields["field1"] .CustomOptions; AssertOption(8765432109UL, fieldOptions.TryGetFixed64, FieldOpt1); + var oneofOptions = TestMessageWithCustomOptions.Descriptor.Oneofs[0].CustomOptions; + AssertOption(-99, oneofOptions.TryGetInt32, OneofOpt1); + var enumOptions = TestMessageWithCustomOptions.Descriptor.EnumTypes[0].CustomOptions; AssertOption(-789, enumOptions.TryGetSFixed32, EnumOpt1); -- cgit v1.2.3