Skip to content

Commit b51c022

Browse files
committed
Hardcode the integers instead of converting the ZLibNative values, as the Brotli test project also inherits and uses this test.
1 parent 98fc780 commit b51c022

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,10 @@ async Task<long> GetLengthAsync(int compressionLevel)
513513
return mms.Length;
514514
}
515515

516-
// Avoid comparing compression level numbers that are too close to each other, as for those cases the expected file size difference cannot be guaranteed
517-
long noCompressionLength = await GetLengthAsync((int)ZLibNative.CompressionLevel.NoCompression);
518-
long fastestLength = await GetLengthAsync((int)ZLibNative.CompressionLevel.BestSpeed);
519-
long optimalLength = await GetLengthAsync((int)ZLibNative.CompressionLevel.DefaultCompression);
520-
long smallestLength = await GetLengthAsync((int)ZLibNative.CompressionLevel.BestCompression);
516+
long fastestLength = await GetLengthAsync(1);
517+
long optimalLength = await GetLengthAsync(5);
518+
long smallestLength = await GetLengthAsync(9);
521519

522-
Assert.True(noCompressionLength >= fastestLength);
523520
Assert.True(fastestLength >= optimalLength);
524521
Assert.True(optimalLength >= smallestLength);
525522
}

0 commit comments

Comments
 (0)