Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ public void BufferSize()

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))]
[OuterLoop]
[InlineData(int.MaxValue / 2 + 1)]
public void WriteFromByte_InputSizeLargerThanHalfOfMaxInt_ShouldSuccess(int inputSize)
public void WriteFromByte_InputSizeLargerThanHalfOfMaxInt_ShouldSuccess()
{
const int InputSize = int.MaxValue / 2 + 1;
byte[] bytes;

try
{
bytes = new byte[inputSize];
bytes = new byte[InputSize];
}
catch (OutOfMemoryException)
{
Expand All @@ -72,21 +71,20 @@ public void WriteFromByte_InputSizeLargerThanHalfOfMaxInt_ShouldSuccess(int inpu
var writableStream = new WriteOnlyStream();
using (var bs = new BufferedStream(writableStream))
{
bs.Write(bytes, 0, inputSize);
Assert.Equal(inputSize, writableStream.Position);
bs.Write(bytes, 0, InputSize);
Assert.Equal(InputSize, writableStream.Position);
}
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))]
[OuterLoop]
[InlineData(int.MaxValue / 2 + 1)]
public void WriteFromSpan_InputSizeLargerThanHalfOfMaxInt_ShouldSuccess(int inputSize)
public void WriteFromSpan_InputSizeLargerThanHalfOfMaxInt_ShouldSuccess()
{
const int InputSize = int.MaxValue / 2 + 1;
byte[] bytes;

try
{
bytes = new byte[inputSize];
bytes = new byte[InputSize];
}
catch (OutOfMemoryException)
{
Expand All @@ -97,7 +95,7 @@ public void WriteFromSpan_InputSizeLargerThanHalfOfMaxInt_ShouldSuccess(int inpu
using (var bs = new BufferedStream(writableStream))
{
bs.Write(new ReadOnlySpan<byte>(bytes));
Assert.Equal(inputSize, writableStream.Position);
Assert.Equal(InputSize, writableStream.Position);
}
}

Expand Down