diff options
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/Reflection')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs b/csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs index eff6e260..51eff053 100644 --- a/csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs +++ b/csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs @@ -64,6 +64,7 @@ namespace Google.Protobuf.Reflection MessageDescriptor messageType = TestAllTypes.Descriptor; Assert.AreSame(typeof(TestAllTypes), messageType.GeneratedType); + Assert.AreSame(TestAllTypes.Parser, messageType.Parser); Assert.AreEqual(messageType, file.MessageTypes[0]); Assert.AreEqual(messageType, file.FindTypeByName<MessageDescriptor>("TestAllTypes")); Assert.Null(file.FindTypeByName<MessageDescriptor>("NoSuchType")); @@ -234,9 +235,10 @@ namespace Google.Protobuf.Reflection // We should still be able to get at a field... var messageDescriptor = newDescriptor.FindTypeByName<MessageDescriptor>("ItemField"); var fieldDescriptor = messageDescriptor.FindFieldByName("item"); - // But there shouldn't be an accessor (or a generated type for the message) + // But there shouldn't be an accessor (or a generated type for the message, or parser) Assert.IsNull(fieldDescriptor.Accessor); Assert.IsNull(messageDescriptor.GeneratedType); + Assert.IsNull(messageDescriptor.Parser); } // From TestFieldOrdering: |