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

Disable shrinker when shrink_time is zero #251

Merged
merged 3 commits into from
Oct 20, 2024

Conversation

mkforsb
Copy link
Contributor

@mkforsb mkforsb commented Oct 20, 2024

Fixes #248.

  1. Early return None in Shrinker::shrink for zero shrink time.
  2. Avoid a little bit of prep work in TestEngine by checking shrink time in rng_options.

@@ -1,8 +1,24 @@
use super::*;
use std::time::Duration;

macro_rules! shrink_test_assert {
($test:ident, $input:ident, $options:ident, (None)) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Case for disabled shrinker.

Copy link
Owner

@camshaft camshaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for the change!

@camshaft camshaft merged commit 18d1f38 into camshaft:master Oct 20, 2024
9 checks passed
@mkforsb mkforsb deleted the shrinker-zero-time-fix branch October 21, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shrinker runs once when shrink_time is zero.
2 participants