Update unit tests to Microsoft.CodeAnalysis.Testing#2751
Merged
sharwell merged 37 commits intoDotNetAnalyzers:masterfrom Sep 12, 2018
Merged
Update unit tests to Microsoft.CodeAnalysis.Testing#2751sharwell merged 37 commits intoDotNetAnalyzers:masterfrom
sharwell merged 37 commits intoDotNetAnalyzers:masterfrom
Conversation
sharwell
commented
Aug 9, 2018
StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/StyleCopDiagnosticVerifier`1.cs
Outdated
Show resolved
Hide resolved
sharwell
commented
Aug 9, 2018
StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/GenericAnalyzerTest.cs
Outdated
Show resolved
Hide resolved
sharwell
commented
Aug 9, 2018
StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1000CSharp7UnitTests.cs
Outdated
Show resolved
Hide resolved
JohanLarsson
reviewed
Aug 9, 2018
StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1000CSharp7UnitTests.cs
Outdated
Show resolved
Hide resolved
JohanLarsson
reviewed
Aug 9, 2018
StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1000CSharp7UnitTests.cs
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #2751 +/- ##
==========================================
+ Coverage 97.38% 97.39% +0.01%
==========================================
Files 752 752
Lines 99590 97181 -2409
Branches 3267 3171 -96
==========================================
- Hits 96982 94652 -2330
+ Misses 1738 1680 -58
+ Partials 870 849 -21 |
|
Why pass in explicit empty collection of diagnostic results when testing valid code? await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);vs await VerifyValidAsync(testCode).ConfigureAwait(false);Also removing async: VerifyValid(testCode); |
a1b17c3 to
9c0e99b
Compare
sharwell
commented
Aug 13, 2018
StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/GenericAnalyzerTest.cs
Outdated
Show resolved
Hide resolved
71b5d56 to
6c0f6d9
Compare
6 tasks
* DiagnosticResult * EmptyCodeFixProvider * MetadataReferences * SourceFileCollection * SourceFileList
d0a4936 to
3c3d7dc
Compare
92a3a0d to
183b7fc
Compare
183b7fc to
b455370
Compare
sharwell
commented
Sep 6, 2018
StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1501UnitTests.cs
Outdated
Show resolved
Hide resolved
StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1412UnitTests.cs
Outdated
Show resolved
Hide resolved
StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1412UnitTests.cs
Outdated
Show resolved
Hide resolved
StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/StyleCopCodeFixVerifier`2.cs
Show resolved
Hide resolved
StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/StyleCopCodeFixVerifier`2.cs
Outdated
Show resolved
Hide resolved
StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/StyleCopCodeFixVerifier`2.cs
Outdated
Show resolved
Hide resolved
d061d77 to
63b3b59
Compare
Member
Author
|
@vweijsters @pdelvo @JohanLarsson This is now ready for review. After getting a sense of the changes from looking at a few updated test classes, I recommend reviewing the more recent commits to understand the direction change. The merge commits are helpful as well, e.g. 7781c99 shows how the tests added in #2779 were updated to account for the new library. |
This comment has been minimized.
This comment has been minimized.
pdelvo
approved these changes
Sep 12, 2018
Member
pdelvo
left a comment
There was a problem hiding this comment.
I reviewed the main changes and took a look at some (not all) of the test classes. Those changes look good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was looking at dotnet/roslyn-sdk#123 and considering what it might look like to switch from a source code distribution to a NuGet-based distribution. This is a proof of concept that preserves much of the original form used for testing StyleCop Analyzers, but separates the StyleCop Analyzers-specific items from the base testing support.
/cc @mavasani @DustinCampbell @jmarolf @JohanLarsson