Skip to content
Open
Show file tree
Hide file tree
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 @@ -2,13 +2,16 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.IO;
using System.Collections.Generic;
using System.IO.Tests;
using System.Threading.Tasks;

namespace System.Memory.Tests
{
public class NativeReadOnlyMemoryStreamConformanceTests : StandaloneStreamConformanceTests
{
public new static IEnumerable<object[]> AllSeekModes() => StreamConformanceTests.AllSeekModes();

protected override bool CanSeek => true;
protected override bool CanSetLength => false;
protected override bool NopFlushCompletesSynchronously => true;
Expand All @@ -28,4 +31,3 @@ public class NativeReadOnlyMemoryStreamConformanceTests : StandaloneStreamConfor
protected override Task<Stream?> CreateReadWriteStreamCore(byte[]? initialData) => Task.FromResult<Stream?>(null);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.IO;
using System.Collections.Generic;
using System.IO.Tests;
using System.Threading.Tasks;

namespace System.Memory.Tests
{
public class NativeWritableMemoryStreamConformanceTests : StandaloneStreamConformanceTests
{
public new static IEnumerable<object[]> AllSeekModes() => StreamConformanceTests.AllSeekModes();

protected override bool CanSeek => true;
protected override bool CanSetLength => false;
protected override bool NopFlushCompletesSynchronously => true;
Expand Down Expand Up @@ -36,4 +39,3 @@ public class NativeWritableMemoryStreamConformanceTests : StandaloneStreamConfor
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
using System.Buffers;
using System.Collections.Generic;
using System.IO.Tests;
using System.Threading.Tasks;
using Xunit;
Expand All @@ -10,6 +11,8 @@ namespace System.Memory.Tests
{
public class ROSequenceStreamConformanceTests : StandaloneStreamConformanceTests
{
public new static IEnumerable<object[]> AllSeekModes() => StreamConformanceTests.AllSeekModes();

protected override bool CanSeek => true;
protected override bool CanSetLength => false;
protected override bool NopFlushCompletesSynchronously => true;
Expand All @@ -35,8 +38,6 @@ protected virtual ReadOnlySequence<byte> CreateSequence(byte[] data)
protected override Task<Stream?> CreateReadWriteStreamCore(byte[]? initialData)
=> Task.FromResult<Stream?>(null);

[Theory]
[MemberData(nameof(AllSeekModes))]
public override async Task Seek_PastEnd_ReadReturns0(SeekMode mode)
{
await base.Seek_PastEnd_ReadReturns0(mode);
Expand Down
Loading