diff options
author | Jon Skeet <jonskeet@google.com> | 2017-06-12 07:04:22 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2017-07-04 06:42:45 +0100 |
commit | cdd524a0bdfc16853271cca7b8fa95577b75085d (patch) | |
tree | bb272f4a20d191758b11c2f33eb82634728dd392 /csharp/compatibility_tests | |
parent | 62d7fe569717b6da39401a94b22adf73466e1f2d (diff) | |
download | protobuf-cdd524a0bdfc16853271cca7b8fa95577b75085d.tar.gz protobuf-cdd524a0bdfc16853271cca7b8fa95577b75085d.tar.bz2 protobuf-cdd524a0bdfc16853271cca7b8fa95577b75085d.zip |
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.
Diffstat (limited to 'csharp/compatibility_tests')
-rw-r--r-- | csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedInputStreamTest.cs | 2 | ||||
-rw-r--r-- | csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedOutputStreamTest.cs | 2 |
2 files changed, 2 insertions, 2 deletions
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();
|