From cdd524a0bdfc16853271cca7b8fa95577b75085d Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Mon, 12 Jun 2017 07:04:22 +0100 Subject: Ensure leaveOpen is true when writing to a buffer Note that the compatibility tests have had to cahnge as well, to cope with internal changes. (The test project has access to internals in the main project.) Fixes #3209. --- .../v3.0.0/src/Google.Protobuf.Test/CodedInputStreamTest.cs | 2 +- .../v3.0.0/src/Google.Protobuf.Test/CodedOutputStreamTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'csharp/compatibility_tests') diff --git a/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedInputStreamTest.cs b/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedInputStreamTest.cs index c0a9ffd1..ff44895c 100644 --- a/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedInputStreamTest.cs +++ b/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedInputStreamTest.cs @@ -403,7 +403,7 @@ namespace Google.Protobuf output.Flush(); ms.Position = 0; - CodedInputStream input = new CodedInputStream(ms, new byte[ms.Length / 2], 0, 0); + CodedInputStream input = new CodedInputStream(ms, new byte[ms.Length / 2], 0, 0, false); uint tag = input.ReadTag(); Assert.AreEqual(1, WireFormat.GetTagFieldNumber(tag)); diff --git a/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedOutputStreamTest.cs b/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedOutputStreamTest.cs index 48bf6d60..01bd3218 100644 --- a/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedOutputStreamTest.cs +++ b/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedOutputStreamTest.cs @@ -334,7 +334,7 @@ namespace Google.Protobuf } // Now test Input stream: { - CodedInputStream cin = new CodedInputStream(new MemoryStream(bytes), new byte[50], 0, 0); + CodedInputStream cin = new CodedInputStream(new MemoryStream(bytes), new byte[50], 0, 0, false); Assert.AreEqual(0, cin.Position); // Field 1: uint tag = cin.ReadTag(); -- cgit v1.2.3