You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using class AnalyzerTest<TVerifier> and a diagnostic is detected, the following output is written to the test log
System.InvalidOperationException
Context: Diagnostics of test state
Mismatch between number of diagnostics returned, expected "1" actual "2"
Diagnostics:
// /0/Test1.cs(7,19): info MYD1000: Lorem ipsum
VerifyCS.Diagnostic().WithSpan("/0/Test1.cs", 7, 19, 7, 30),
// /0/Test1.cs(8,19): info MYD1000: Lorem ipsum
VerifyCS.Diagnostic().WithSpan("/0/Test1.cs", 8, 19, 8, 25),
It would be most helpful if the output also printed the code where the analyzer hit.
I agree. It would be particularly nice if it was able to print out messages using the {|#0:...|} syntax in the source code, and VerifyCS.Diagnostic().WithLocation(0) as the diagnostic.
When using class
AnalyzerTest<TVerifier>
and a diagnostic is detected, the following output is written to the test logIt would be most helpful if the output also printed the code where the analyzer hit.
roslyn-sdk/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs
Line 815 in e9aff57
The text was updated successfully, but these errors were encountered: