From 7cef629a06339afe18d3e7d79d244bdca1b8a04b Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Fri, 13 Feb 2026 12:46:48 +0000 Subject: [PATCH] add compiler flags --- .../Streams/SharpCompressStreamEdgeAsyncTest.cs | 7 +++++++ .../Streams/SharpCompressStreamErrorAsyncTest.cs | 2 ++ .../Streams/SharpCompressStreamPassthroughAsyncTest.cs | 2 ++ 3 files changed, 11 insertions(+) diff --git a/tests/SharpCompress.Test/Streams/SharpCompressStreamEdgeAsyncTest.cs b/tests/SharpCompress.Test/Streams/SharpCompressStreamEdgeAsyncTest.cs index e4ba0596..1c3b7d18 100644 --- a/tests/SharpCompress.Test/Streams/SharpCompressStreamEdgeAsyncTest.cs +++ b/tests/SharpCompress.Test/Streams/SharpCompressStreamEdgeAsyncTest.cs @@ -9,6 +9,8 @@ namespace SharpCompress.Test.Streams; public class SharpCompressStreamEdgeAsyncTest { +#if !LEGACY_DOTNET + [Fact] public async ValueTask DisposeAsync_WithLeaveStreamOpenTrue_DoesNotDisposeUnderlying() { @@ -28,6 +30,7 @@ public class SharpCompressStreamEdgeAsyncTest await stream.DisposeAsync().ConfigureAwait(false); Assert.Throws(() => ms.Read(new byte[1], 0, 1)); } +#endif [Fact] public async ValueTask ReadAsync_ZeroCount_ReturnsZero() @@ -50,6 +53,7 @@ public class SharpCompressStreamEdgeAsyncTest Assert.Equal(0, bytesRead); } +#if !LEGACY_DOTNET [Fact] public async ValueTask ReadAsyncMemory_ZeroCount_ReturnsZero() { @@ -70,6 +74,7 @@ public class SharpCompressStreamEdgeAsyncTest int bytesRead = await stream.ReadAsync(buffer.AsMemory()).ConfigureAwait(false); Assert.Equal(0, bytesRead); } +#endif [Fact] public async ValueTask CopyToAsync_DelegatesToUnderlyingStream() @@ -91,6 +96,7 @@ public class SharpCompressStreamEdgeAsyncTest Assert.Equal(new byte[] { 1, 2, 3, 4, 5 }, destination.ToArray()); } +#if !LEGACY_DOTNET [Fact] public async ValueTask WriteAsyncMemory_DelegatesToUnderlying() { @@ -110,4 +116,5 @@ public class SharpCompressStreamEdgeAsyncTest await stream.FlushAsync().ConfigureAwait(false); Assert.Equal(3, ms.Length); } +#endif } diff --git a/tests/SharpCompress.Test/Streams/SharpCompressStreamErrorAsyncTest.cs b/tests/SharpCompress.Test/Streams/SharpCompressStreamErrorAsyncTest.cs index 31df9ac8..318ebfd6 100644 --- a/tests/SharpCompress.Test/Streams/SharpCompressStreamErrorAsyncTest.cs +++ b/tests/SharpCompress.Test/Streams/SharpCompressStreamErrorAsyncTest.cs @@ -45,6 +45,7 @@ public class SharpCompressStreamErrorAsyncTest } } +#if !LEGACY_DOTNET [Fact] public async ValueTask DisposeAsync_WithThrowOnDisposeTrue_ThrowsInvalidOperation() { @@ -57,6 +58,7 @@ public class SharpCompressStreamErrorAsyncTest ) .ConfigureAwait(false); } +#endif [Fact] public async ValueTask CreateNonDisposing_ReadAsync_ZeroCount_ReturnsZero() diff --git a/tests/SharpCompress.Test/Streams/SharpCompressStreamPassthroughAsyncTest.cs b/tests/SharpCompress.Test/Streams/SharpCompressStreamPassthroughAsyncTest.cs index 7e8b93d4..a3972f33 100644 --- a/tests/SharpCompress.Test/Streams/SharpCompressStreamPassthroughAsyncTest.cs +++ b/tests/SharpCompress.Test/Streams/SharpCompressStreamPassthroughAsyncTest.cs @@ -83,6 +83,7 @@ public class SharpCompressStreamPassthroughAsyncTest Assert.Equal(3, ms.Length); } +#if !LEGACY_DOTNET [Fact] public async ValueTask CreateNonDisposing_DoesNotDisposeUnderlying_Async() { @@ -105,4 +106,5 @@ public class SharpCompressStreamPassthroughAsyncTest ) .ConfigureAwait(false); } +#endif }