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

Self-tests can run from a simple string #439

Conversation

sourcefrog
Copy link
Owner

Many of the tests are concerned with what mutations are generated from some source code, given some options. For many of these we don't really need a source tree on disk and certainly not to run cargo: it's enough just to have the one file we're mutating.

This adds a new API making just the mutation code accessible to unit tests.

This ought to make tests faster to run, and potentially easier to write because they can be more self contained.

Fixes #433

@sourcefrog sourcefrog marked this pull request as ready for review November 12, 2024 16:00
@sourcefrog sourcefrog merged commit fc8531c into main Nov 13, 2024
26 of 28 checks passed
@sourcefrog sourcefrog deleted the 433-cargo-mutants-self-tests-from-a-source-file-string-rather-than-a-working-dir branch November 13, 2024 15:47
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.

cargo-mutants self-tests from a source file string rather than a working dir
1 participant