aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf.Test/Reflection
diff options
context:
space:
mode:
authorGravatar Jie Luo <jieluo@google.com>2017-01-27 11:45:31 -0800
committerGravatar Jie Luo <jieluo@google.com>2017-01-27 11:52:32 -0800
commitccb76fff445862ac11bf7980818d587030f1c7d9 (patch)
tree6732e2f456e40f64ab2fa6e93e780d23840dbe26 /csharp/src/Google.Protobuf.Test/Reflection
parent5af0b547de7aba6d6206943546262cb21fedc721 (diff)
Add Oneof custom options test
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/Reflection')
-rw-r--r--csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs4
1 files changed, 4 insertions, 0 deletions
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);