Skip to content

Commit

Permalink
Add test for MemoryStream's buffer after Capacity reset (dotnet#36580)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub authored Apr 8, 2019
1 parent 1d63519 commit 268812e
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ public void MemoryStream_GetBuffer_Exposable()
Assert.Equal(500, buffer.Length);
}

[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/23700")]
[Fact]
public void MemoryStream_GetBuffer_AfterCapacityReset()
{
var ms = new MemoryStream(100);
ms.Capacity = 0;
Assert.NotNull(ms.GetBuffer());
}

[Fact]
public void MemoryStream_GetBuffer()
{
Expand Down

0 comments on commit 268812e

Please sign in to comment.