diff --git a/tests/SharpCompress.Test/SevenZip/SevenZipDeflateSolidTests.cs b/tests/SharpCompress.Test/SevenZip/SevenZipDeflateSolidTests.cs index 085abf82..328c0f21 100644 --- a/tests/SharpCompress.Test/SevenZip/SevenZipDeflateSolidTests.cs +++ b/tests/SharpCompress.Test/SevenZip/SevenZipDeflateSolidTests.cs @@ -102,11 +102,7 @@ public class SevenZipDeflateSolidTests : TestBase continue; } -#if LEGACY_DOTNET - using var stream = await reader.OpenEntryStreamAsync(CancellationToken.None); -#else await using var stream = await reader.OpenEntryStreamAsync(CancellationToken.None); -#endif if (index == 0 && firstEntryMode == 1) { Assert.True( diff --git a/tests/SharpCompress.Test/Zip/Zip64DescriptorSizeTests.cs b/tests/SharpCompress.Test/Zip/Zip64DescriptorSizeTests.cs index f4aeb6ce..6dc0e132 100644 --- a/tests/SharpCompress.Test/Zip/Zip64DescriptorSizeTests.cs +++ b/tests/SharpCompress.Test/Zip/Zip64DescriptorSizeTests.cs @@ -363,11 +363,7 @@ public class Zip64DescriptorSizeTests ); Assert.True(await reader.MoveToNextEntryAsync(CancellationToken.None)); var first = reader.Entry; -#if LEGACY_DOTNET - using (var stream = await reader.OpenEntryStreamAsync(CancellationToken.None)) -#else await using (var stream = await reader.OpenEntryStreamAsync(CancellationToken.None)) -#endif { await stream.CopyToAsync(Stream.Null, 81920, CancellationToken.None); } @@ -378,11 +374,7 @@ public class Zip64DescriptorSizeTests } Assert.Equal("second", reader.Entry.Key); using var second = new MemoryStream(); -#if LEGACY_DOTNET - using (var stream = await reader.OpenEntryStreamAsync(CancellationToken.None)) -#else await using (var stream = await reader.OpenEntryStreamAsync(CancellationToken.None)) -#endif { await stream.CopyToAsync(second, 81920, CancellationToken.None); } diff --git a/tests/SharpCompress.Test/Zip/Zip64NonSeekableTests.cs b/tests/SharpCompress.Test/Zip/Zip64NonSeekableTests.cs index 91f9126b..9a42c7e5 100644 --- a/tests/SharpCompress.Test/Zip/Zip64NonSeekableTests.cs +++ b/tests/SharpCompress.Test/Zip/Zip64NonSeekableTests.cs @@ -143,11 +143,7 @@ public class Zip64NonSeekableTests continue; } Assert.Equal(entries[index].Name, reader.Entry.Key); -#if LEGACY_DOTNET - using var source = await reader.OpenEntryStreamAsync(CancellationToken.None); -#else await using var source = await reader.OpenEntryStreamAsync(CancellationToken.None); -#endif using var extracted = new MemoryStream(); await source.CopyToAsync(extracted, 81920, CancellationToken.None); Assert.Equal(entries[index++].Content, extracted.ToArray()); diff --git a/tests/SharpCompress.Test/Zip/ZipBZip2CorruptionTests.cs b/tests/SharpCompress.Test/Zip/ZipBZip2CorruptionTests.cs index d9990ec7..9b149f9f 100644 --- a/tests/SharpCompress.Test/Zip/ZipBZip2CorruptionTests.cs +++ b/tests/SharpCompress.Test/Zip/ZipBZip2CorruptionTests.cs @@ -77,11 +77,7 @@ public class ZipBZip2CorruptionTests : TestBase { while (await reader.MoveToNextEntryAsync(CancellationToken.None)) { -#if LEGACY_DOTNET - using var entry = await reader.OpenEntryStreamAsync(CancellationToken.None); -#else await using var entry = await reader.OpenEntryStreamAsync(CancellationToken.None); -#endif if (!skipEntry) { await entry.CopyToAsync(Stream.Null, 81920, CancellationToken.None);