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

test(fuzz): Make cargo fuzz fmt fuzz_write output more reliably equivalent to the code path it follows #224

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

Pr0methean
Copy link
Member

@Pr0methean Pr0methean commented Jul 26, 2024

This will make it possible to copy and paste the output of cargo fuzz fmt fuzz_write into a unit test with only the following changes:

  • Add the test function declaration and the final return of Ok(()).
  • Remove zopfli_buffer_size and add ..Default::default() to FullFileOptions instances, unless the test case depends on Zopfli.
  • Add all the feature flags the test case depends on.
  • Add use statements (with function scope if they're gated on feature flags).
  • Run cargo fmt --all.

@Pr0methean Pr0methean added this pull request to the merge queue Jul 26, 2024
Merged via the queue into master with commit a29b860 Jul 27, 2024
45 checks passed
@Pr0methean Pr0methean deleted the fuzz-fmt branch July 27, 2024 01:55
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.

1 participant