Skip to content

Commit 49abae6

Browse files
Merge 6b56147 into 50610bc
2 parents 50610bc + 6b56147 commit 49abae6

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/DocumentationRules/SA1600CSharp10UnitTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ protected override DiagnosticResult[] GetExpectedResultTestRegressionMethodGloba
2222
// /0/Test0.cs(4,1): error CS0106: The modifier 'public' is not valid for this item
2323
DiagnosticResult.CompilerError("CS0106").WithSpan(4, 1, 4, 7).WithArguments("public"),
2424

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-
2825
// /0/Test0.cs(4,1): error CS8805: Program using top-level statements must be an executable.
2926
DiagnosticResult.CompilerError("CS8805").WithSpan(4, 1, 4, 29),
3027
};

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/DocumentationRules/SA1600CSharp8UnitTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33

44
namespace StyleCop.Analyzers.Test.CSharp8.DocumentationRules
55
{
6+
using Microsoft.CodeAnalysis.CSharp;
67
using StyleCop.Analyzers.Test.CSharp7.DocumentationRules;
78

89
public class SA1600CSharp8UnitTests : SA1600CSharp7UnitTests
910
{
11+
// Using 'Default' here makes sure that later test projects also run these tests with their own language version, without having to override this property
12+
protected override LanguageVersion LanguageVersion => LanguageVersion.Default;
1013
}
1114
}

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/DocumentationRules/SA1600CSharp9UnitTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ protected override DiagnosticResult[] GetExpectedResultTestRegressionMethodGloba
2121

2222
// /0/Test0.cs(4,1): error CS0106: The modifier 'public' is not valid for this item
2323
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"),
2724
};
2825
}
2926

0 commit comments

Comments
 (0)