aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2015-11-19 12:36:51 +0000
committerJon Skeet <skeet@pobox.com>2015-11-19 12:36:51 +0000
commitff37edcd8a533b5440dfae541ea85f8b41d94e55 (patch)
tree0ab0f79a8121e4c8a5d49afc6caae561963f7ed4 /csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs
parentc581acb562fad93c4eb7b125cc31b64fa6f51868 (diff)
parent360feda5f76e62a3a8e5b086bdb3b851f7730f2e (diff)
downloadprotobuf-ff37edcd8a533b5440dfae541ea85f8b41d94e55.tar.gz
protobuf-ff37edcd8a533b5440dfae541ea85f8b41d94e55.tar.bz2
protobuf-ff37edcd8a533b5440dfae541ea85f8b41d94e55.zip
Merge pull request #974 from jskeet/parser
Parser property in MessageDescriptor
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs')
-rw-r--r--csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs4
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: