Skip to content

Commit e5cfbdb

Browse files
authored
Target .NET 8 (tests etc.) (#1523)
1 parent 708be3f commit e5cfbdb

File tree

19 files changed

+28
-19
lines changed

19 files changed

+28
-19
lines changed

src/Tests/Analyzers.Tests/Analyzers.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tests/Analyzers.Tests/RCS1257UseEnumFieldExplicitlyTests.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,23 @@ enum Foo
123123
}
124124

125125
[Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UseEnumFieldExplicitly)]
126-
public async Task TestNoDiagnostic_FileAttributes()
126+
public async Task TestNoDiagnostic_ZeroNotDefined()
127127
{
128128
await VerifyNoDiagnosticAsync(@"
129129
class C
130130
{
131131
void M()
132132
{
133-
var x = (System.IO.FileAttributes)0;
133+
var x = (E)0;
134134
}
135135
}
136+
137+
[System.Flags]
138+
enum E
139+
{
140+
A = 1,
141+
B = 2,
142+
}
136143
");
137144
}
138145
}

src/Tests/CSharp.Tests/CSharp.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tests/CSharp.Workspaces.Tests/CSharp.Workspaces.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tests/CodeAnalysis.Analyzers.Tests/CodeAnalysis.Analyzers.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tests/CodeFixes.Tests/CodeFixes.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tests/Core.Tests/Core.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tests/Formatting.Analyzers.Tests/Formatting.Analyzers.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tests/Refactorings.Tests/RR0059AddMissingCasesToSwitchStatementTests.cs

+2
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ void M()
249249
break;
250250
case RegexOptions.CultureInvariant:
251251
break;
252+
case RegexOptions.NonBacktracking:
253+
break;
252254
default:
253255
break;
254256
}

src/Tests/Refactorings.Tests/Refactorings.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tests/TestConsole/TestConsole.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<PropertyGroup>

src/Tests/TestLibrary/TestLibrary.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tools/CodeGeneration/CSharp/DiagnosticRulesGenerator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected virtual ClassDeclarationSyntax CreateClassDeclaration(
9797
useParentProperties)));
9898
}
9999

100-
private MemberDeclarationSyntax CreateMember(
100+
private FieldDeclarationSyntax CreateMember(
101101
AnalyzerMetadata analyzer,
102102
string identifiersClassName,
103103
string categoryName,

src/Tools/CodeGeneration/CodeGeneration.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tools/CodeGeneration/Markdown/MarkdownGenerator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ private static MElement CheckboxOrHyphen(bool value)
476476
}
477477
}
478478

479-
private static MObject CreateFrontMatter(string title = null, int? position = null, string label = null)
479+
private static DocusaurusFrontMatter CreateFrontMatter(string title = null, int? position = null, string label = null)
480480
{
481481
return DocusaurusMarkdownFactory.FrontMatter(GetLabels());
482482

src/Tools/CodeGenerator/CodeGenerator.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<PropertyGroup>

src/Tools/ConfigurationFileGenerator/ConfigurationFileGenerator.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<PropertyGroup>

src/Tools/Metadata/Metadata.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Tools/MetadataGenerator/MetadataGenerator.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<PropertyGroup>

0 commit comments

Comments
 (0)