From 47913c20ab9f13fd8ad7f99283ad311983f1feac Mon Sep 17 00:00:00 2001 From: mgravell Date: Thu, 4 Jul 2019 09:27:18 +0100 Subject: [PATCH] utf8-encode; fix broken test --- src/csharp/Grpc.Core.Tests/MetadataTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/MetadataTest.cs b/src/csharp/Grpc.Core.Tests/MetadataTest.cs index 7286f9c9932..0b5f1c76e0c 100644 --- a/src/csharp/Grpc.Core.Tests/MetadataTest.cs +++ b/src/csharp/Grpc.Core.Tests/MetadataTest.cs @@ -116,7 +116,7 @@ namespace Grpc.Core.Tests var bytes = new byte[] { (byte)'X', (byte)'y' }; fixed (byte* ptr = bytes) { - var entry = Metadata.Entry.CreateUnsafe("abc", ptr, bytes.Length); + var entry = Metadata.Entry.CreateUnsafe("abc", new IntPtr(ptr), bytes.Length); Assert.IsFalse(entry.IsBinary); Assert.AreEqual("abc", entry.Key); Assert.AreEqual("Xy", entry.Value); @@ -130,7 +130,7 @@ namespace Grpc.Core.Tests var bytes = new byte[] { 1, 2, 3 }; fixed (byte* ptr = bytes) { - var entry = Metadata.Entry.CreateUnsafe("abc-bin", ptr, bytes.Length); + var entry = Metadata.Entry.CreateUnsafe("abc-bin", new IntPtr(ptr), bytes.Length); Assert.IsTrue(entry.IsBinary); Assert.AreEqual("abc-bin", entry.Key); Assert.Throws(typeof(InvalidOperationException), () => { var v = entry.Value; });