diff options
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/FieldCodecTest.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/FieldCodecTest.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs b/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs index c616470e..0e2bad59 100644 --- a/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs +++ b/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs @@ -32,6 +32,7 @@ using System.Collections.Generic; using System.IO; +using System.Reflection; using Google.Protobuf.TestProtos; using NUnit.Framework; @@ -162,7 +163,7 @@ namespace Google.Protobuf codedOutput.Flush(); Assert.AreEqual(0, stream.Position); Assert.AreEqual(0, codec.CalculateSizeWithTag(codec.DefaultValue)); - if (typeof(T).IsValueType) + if (typeof(T).GetTypeInfo().IsValueType) { Assert.AreEqual(default(T), codec.DefaultValue); } |