Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In InflaterDeflaterTestSuite, use the Range attribute to test different compression levels #494

Merged
merged 1 commit into from
Aug 7, 2020
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
15 changes: 5 additions & 10 deletions test/ICSharpCode.SharpZipLib.Tests/Base/InflaterDeflaterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,9 @@ private void RandomDeflateInflate(int size, int level, bool zlib)
/// </summary>
[Test]
[Category("Base")]
public void InflateDeflateZlib()
public void InflateDeflateZlib([Range(0, 9)] int level)
{
for (int level = 0; level < 10; ++level)
{
RandomDeflateInflate(100000, level, true);
}
RandomDeflateInflate(100000, level, true);
}

private delegate void RunCompress(byte[] buffer);
Expand Down Expand Up @@ -167,14 +164,12 @@ private void TryManyVariants(int level, bool zlib, RunCompress test, byte[] buff
/// </summary>
[Test]
[Category("Base")]
public void InflateDeflateNonZlib()
public void InflateDeflateNonZlib([Range(0, 9)] int level)
{
for (int level = 0; level < 10; ++level)
{
RandomDeflateInflate(100000, level, false);
}
RandomDeflateInflate(100000, level, false);
}


[Test]
[Category("Base")]
public void CloseDeflatorWithNestedUsing()
Expand Down