diff options
author | Jie Luo <jieluo@google.com> | 2017-01-27 11:45:31 -0800 |
---|---|---|
committer | Jie Luo <jieluo@google.com> | 2017-01-27 11:52:32 -0800 |
commit | ccb76fff445862ac11bf7980818d587030f1c7d9 (patch) | |
tree | 6732e2f456e40f64ab2fa6e93e780d23840dbe26 /csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs | |
parent | 5af0b547de7aba6d6206943546262cb21fedc721 (diff) | |
download | protobuf-ccb76fff445862ac11bf7980818d587030f1c7d9.tar.gz protobuf-ccb76fff445862ac11bf7980818d587030f1c7d9.tar.bz2 protobuf-ccb76fff445862ac11bf7980818d587030f1c7d9.zip |
Add Oneof custom options test
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs | 4 |
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); |