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

Enable FixAll testing by default for all code fix tests #1773

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

mavasani
Copy link
Contributor

@mavasani mavasani commented Aug 8, 2018

All the VerifyXXXFix test helpers now take an optional FixAllScope, which defaults to document/project based on whether the test verifies a single document or multiple documents. After validating the individual diagnostic code fix, the test framework also invokes the FixAll and verifies the result is identical.

For unit tests which have multiple fixable diagnostics in the original source code, they should explicitly disable FixAll testing in the VerifyXXXFix call by passing a null FixAllScope and have a separate FixAll test with appropriate baseline.

For code fixers which have no FixAll support, they can override the TestFixAllByDefault property to turn off FixAll testing for all it's unit tests.

Fixes #1420

All the VerifyXXXFix test helpers now take an optional FixAllScope, which defaults to document/project based on whether the test verifies a single document or multiple documents. After validating the individual diagnostic code fix, the test framework also invokes the FixAll and verifies the result is identical.

For unit tests which have multiple fixable diagnostics in the original source code, they should explicitly disable FixAll testing in the VerifyXXXFix call by passing a null FixAllScope and have a separate FixAll test with appropriate baseline.

For code fixers which have no FixAll support, they can override a property to turn off FixAll testing for all unit tests.

Fixes #dotnet#1420
@mavasani mavasani merged commit 4e9f20e into dotnet:features/dataflow Aug 9, 2018
@mavasani mavasani deleted the EnableFixAllTesting2 branch August 9, 2018 17:18
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.

2 participants