diff --git a/ProtobufSourceGenerator.Tests/AnalyzerTests.cs b/ProtobufSourceGenerator.Tests/AnalyzerTests.cs index 490ff2d..00d47a7 100644 --- a/ProtobufSourceGenerator.Tests/AnalyzerTests.cs +++ b/ProtobufSourceGenerator.Tests/AnalyzerTests.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis.Testing; -using AnalyzeCS = ProtobufSourceGenerator.Tests.AnalyzerFixure; -using VerifyCS = Microsoft.CodeAnalysis.CSharp.Testing.CSharpAnalyzerVerifier; +using AnalyzeCS = ProtobufSourceGenerator.Tests.AnalyzerFixure; +using VerifyCS = Microsoft.CodeAnalysis.CSharp.Testing.CSharpAnalyzerVerifier; namespace ProtobufSourceGenerator.Tests; diff --git a/ProtobufSourceGenerator.Tests/CSharpSourceGeneratorVerifier.cs b/ProtobufSourceGenerator.Tests/CSharpSourceGeneratorVerifier.cs index 834ee65..63528d5 100644 --- a/ProtobufSourceGenerator.Tests/CSharpSourceGeneratorVerifier.cs +++ b/ProtobufSourceGenerator.Tests/CSharpSourceGeneratorVerifier.cs @@ -1,18 +1,15 @@ using System.Collections.Immutable; -using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Testing; using Microsoft.CodeAnalysis.Testing; -using Microsoft.CodeAnalysis.Testing.Verifiers; -using Microsoft.CodeAnalysis.Text; using ProtoBuf; namespace ProtobufSourceGenerator.Tests; public static class CSharpSourceGeneratorVerifier where TSourceGenerator : ISourceGenerator, new() { - public class Test : CSharpSourceGeneratorTest + public class Test : CSharpSourceGeneratorTest { public Test() { diff --git a/ProtobufSourceGenerator.Tests/Incremental/CSharpIncrementalSourceGeneratorVerifier.cs b/ProtobufSourceGenerator.Tests/Incremental/CSharpIncrementalSourceGeneratorVerifier.cs index 8f9eb9a..bd30efe 100644 --- a/ProtobufSourceGenerator.Tests/Incremental/CSharpIncrementalSourceGeneratorVerifier.cs +++ b/ProtobufSourceGenerator.Tests/Incremental/CSharpIncrementalSourceGeneratorVerifier.cs @@ -3,14 +3,13 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Testing; using Microsoft.CodeAnalysis.Testing; -using Microsoft.CodeAnalysis.Testing.Verifiers; using ProtoBuf; namespace ProtobufSourceGenerator.Tests.Incremental; public static class CSharpIncrementalSourceGeneratorVerifier where TIncrementalGenerator : IIncrementalGenerator, new() { - public class Test : CSharpSourceGeneratorTest + public class Test : CSharpSourceGeneratorTest { public Test() { @@ -28,10 +27,7 @@ protected override CompilationOptions CreateCompilationOptions() public LanguageVersion LanguageVersion { get; set; } = LanguageVersion.Default; - protected override IEnumerable GetSourceGenerators() - { - return new[] { new TIncrementalGenerator().AsSourceGenerator() }; - } + protected override IEnumerable GetSourceGenerators() => [typeof(TIncrementalGenerator)]; private static ImmutableDictionary GetNullableWarningsFromCompiler() { diff --git a/ProtobufSourceGenerator.Tests/ProtobufSourceGenerator.Tests.csproj b/ProtobufSourceGenerator.Tests/ProtobufSourceGenerator.Tests.csproj index 3103b2b..c7c9aee 100644 --- a/ProtobufSourceGenerator.Tests/ProtobufSourceGenerator.Tests.csproj +++ b/ProtobufSourceGenerator.Tests/ProtobufSourceGenerator.Tests.csproj @@ -8,9 +8,9 @@ - + - +