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

Analyzer Test Enhancement #1178

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Merge branch 'AnalyzerTest_Enhancement_1169' of https://github.com/Ma…

5369740
Select commit
Loading
Failed to load commit list.
Draft

Analyzer Test Enhancement #1178

Merge branch 'AnalyzerTest_Enhancement_1169' of https://github.com/Ma…
5369740
Select commit
Loading
Failed to load commit list.
Build Analysis / Build Analysis failed Aug 15, 2024 in 0s

.NET Result Analysis

Details

Tip

To unconditionally bypass the build analysis check (turn it green), you can use the escape mechanism feature. The completion time may vary, potentially taking several minutes, depending on the build analysis workload at the moment.

Test Failures (56 tests failed)

🔹 [All failing tests from public-CI]

    ⚠️ 51 failing tests not displayed for this pipeline due to space limitations

    Microsoft.CodeAnalysis.Testing.AdditionalFilesFixTests.TestDiagnosticFixedByRemovingAdditionalFileWithUndeclaredCompileError [Details] [7.69% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (2)

    Exception Message
    System.InvalidOperationException : Actual and expected values differ. Expected shown in baseline of diff:\r\n Context: Diagnostics of fixed state\r\n Mismatch between number of diagnostics returned, expected \"0\" actual \"1\"\r\n \r\n Diagnostics:\r\n // /0/Test0.cs(1,24): error CS1513: } expected\r\n-DiagnosticResult.CompilerError(\"CS1513\").WithSpan(1, 24, 1, 24),\r\n+namespace MyNamespace {{|#0:|}\r\n+DiagnosticResult.CompilerError(\"CS1513\").WithLocation(0),\r\n \r\n \r\n
    CallStack
       at Microsoft.CodeAnalysis.Testing.DefaultVerifier.Fail(String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DefaultVerifier.cs:line 105
       at Microsoft.CodeAnalysis.Testing.IVerifierExtensions.EqualOrDiff(IVerifier verifier, String expected, String actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/Extensions/IVerifierExtensions.cs:line 67
       at Microsoft.CodeAnalysis.Testing.AdditionalFilesFixTests.TestDiagnosticFixedByRemovingAdditionalFileWithUndeclaredCompileError() in /_/tests/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing.UnitTests/AdditionalFilesFixTests.cs:line 188
    --- End of stack trace from previous location where exception was thrown ---
    Microsoft.CodeAnalysis.Testing.AdditionalFilesTests.TestDiagnosticInAdditionalFileNotDeclared [Details] [4.00% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (2)

    Exception Message
    Assert.Equal() Failure\r\n                                   ↓ (pos 134)\r\nExpected: ···ing Brace: message\\r\\nnew DiagnosticResult(HighlightBracesAnaly···\r\nActual:   ···ing Brace: message\\r\\nVerifyCS.Diagnostic(HighlightBracesAnalyz···\r\n                                   ↑ (pos 134)
    CallStack
       at Microsoft.CodeAnalysis.Testing.AdditionalFilesTests.TestDiagnosticInAdditionalFileNotDeclared() in /_/tests/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing.UnitTests/AdditionalFilesTests.cs:line 175
    --- End of stack trace from previous location where exception was thrown ---
    Microsoft.CodeAnalysis.Testing.AdditionalFilesTests.TestDiagnosticInNormalFileNotDeclared [Details] [4.00% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (2)

    Exception Message
    Assert.Equal() Failure\r\n                                   ↓ (pos 136)\r\nExpected: ···ing Brace: message\\r\\nVerifyCS.Diagnostic().WithSpan(1, 23, 1, ···\r\nActual:   ···ing Brace: message\\r\\nnamespace MyNamespace {|#0:{|} }\\r\\nVerifyC···\r\n                                   ↑ (pos 136)
    CallStack
       at Microsoft.CodeAnalysis.Testing.AdditionalFilesTests.TestDiagnosticInNormalFileNotDeclared() in /_/tests/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing.UnitTests/AdditionalFilesTests.cs:line 64
    --- End of stack trace from previous location where exception was thrown ---
    Microsoft.CodeAnalysis.Testing.AnalyzerConfigFilesFixTests.TestDiagnosticFixedByRemovingAnalyzerConfigFileWithUndeclaredCompileError [Details] [4.00% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (2)

    Exception Message
    System.InvalidOperationException : Actual and expected values differ. Expected shown in baseline of diff:\r\n Context: Diagnostics of fixed state\r\n Mismatch between number of diagnostics returned, expected \"0\" actual \"1\"\r\n \r\n Diagnostics:\r\n // /0/Test0.cs(1,24): error CS1513: } expected\r\n-DiagnosticResult.CompilerError(\"CS1513\").WithSpan(1, 24, 1, 24),\r\n+namespace MyNamespace {{|#0:|}\r\n+DiagnosticResult.CompilerError(\"CS1513\").WithLocation(0),\r\n \r\n \r\n
    CallStack
       at Microsoft.CodeAnalysis.Testing.DefaultVerifier.Fail(String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DefaultVerifier.cs:line 105
       at Microsoft.CodeAnalysis.Testing.IVerifierExtensions.EqualOrDiff(IVerifier verifier, String expected, String actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/Extensions/IVerifierExtensions.cs:line 67
       at Microsoft.CodeAnalysis.Testing.AnalyzerConfigFilesFixTests.TestDiagnosticFixedByRemovingAnalyzerConfigFileWithUndeclaredCompileError() in /_/tests/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing.UnitTests/AnalyzerConfigFilesFixTests.cs:line 204
    --- End of stack trace from previous location where exception was thrown ---
    Microsoft.CodeAnalysis.Testing.AnalyzerConfigFilesTests.TestDiagnosticInNormalFileNotDeclared [Details] [4.00% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configurations (2)

    Exception Message
    Assert.Equal() Failure\r\n                                   ↓ (pos 136)\r\nExpected: ···ing Brace: message\\r\\nVerifyCS.Diagnostic().WithSpan(1, 23, 1, ···\r\nActual:   ···ing Brace: message\\r\\nnamespace MyNamespace {|#0:{|} }\\r\\nVerifyC···\r\n                                   ↑ (pos 136)
    CallStack
       at Microsoft.CodeAnalysis.Testing.AnalyzerConfigFilesTests.TestDiagnosticInNormalFileNotDeclared() in /_/tests/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing.UnitTests/AnalyzerConfigFilesTests.cs:line 77
    --- End of stack trace from previous location where exception was thrown ---

Was this helpful? Yes No