|
5 | 5 |
|
6 | 6 | namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules |
7 | 7 | { |
8 | | - using Microsoft.CodeAnalysis.Testing; |
9 | 8 | using StyleCop.Analyzers.Test.CSharp10.DocumentationRules; |
10 | | - using static StyleCop.Analyzers.Test.Verifiers.StyleCopCodeFixVerifier< |
11 | | - StyleCop.Analyzers.DocumentationRules.SA1600ElementsMustBeDocumented, |
12 | | - StyleCop.Analyzers.DocumentationRules.SA1600CodeFixProvider>; |
13 | 9 |
|
14 | 10 | public class SA1600CSharp11UnitTests : SA1600CSharp10UnitTests |
15 | 11 | { |
16 | | - protected override DiagnosticResult[] GetExpectedResultTestRegressionMethodGlobalNamespace(string code) |
17 | | - { |
18 | | - if (code == "public void {|#0:TestMember|}() { }") |
19 | | - { |
20 | | - return new[] |
21 | | - { |
22 | | - // /0/Test0.cs(4,1): error CS0106: The modifier 'public' is not valid for this item |
23 | | - DiagnosticResult.CompilerError("CS0106").WithSpan(4, 1, 4, 7).WithArguments("public"), |
24 | | - |
25 | | - // /0/Test0.cs(4,1): error CS8320: Feature 'top-level statements' is not available in C# 7.2. Please use language version 9.0 or greater. |
26 | | - DiagnosticResult.CompilerError("CS8320").WithSpan(4, 1, 4, 29).WithArguments("top-level statements", "9.0"), |
27 | | - |
28 | | - // /0/Test0.cs(4,1): error CS8805: Program using top-level statements must be an executable. |
29 | | - DiagnosticResult.CompilerError("CS8805").WithSpan(4, 1, 4, 29), |
30 | | - }; |
31 | | - } |
32 | | - |
33 | | - return new[] |
34 | | - { |
35 | | - DiagnosticResult.CompilerError("CS0116").WithMessage("A namespace cannot directly contain members such as fields, methods or statements").WithLocation(0), |
36 | | - Diagnostic().WithLocation(0), |
37 | | - }; |
38 | | - } |
39 | 12 | } |
40 | 13 | } |
0 commit comments