mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
Follow package deprecation instructions
This commit is contained in:
@@ -47,7 +47,7 @@ namespace osu.Framework.SourceGeneration.Tests.Dependencies
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(CheckWithStatisticsData))]
|
||||
public void CheckWithStatistics(string name, (int, int, int)[] expectedStatistics)
|
||||
public void CheckWithStatistics(string name, (int syntaxTargetCreated, int semanticTargetCreated, int emitHits)[] expectedStatistics)
|
||||
{
|
||||
GetTestSources(name,
|
||||
out (string filename, string content)[] commonSources,
|
||||
|
||||
@@ -7,7 +7,6 @@ using System.Text;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.Testing;
|
||||
using Microsoft.CodeAnalysis.Testing.Verifiers;
|
||||
|
||||
namespace osu.Framework.SourceGeneration.Tests
|
||||
{
|
||||
@@ -57,7 +56,7 @@ namespace osu.Framework.SourceGeneration.Tests
|
||||
|
||||
string actual = source.SourceText.ToString();
|
||||
|
||||
new XUnitVerifier().EqualOrDiff(content, actual, $"Phase {phase}: Generated source {filename} did not match expected content");
|
||||
new DefaultVerifier().EqualOrDiff(content, actual, $"Phase {phase}: Generated source {filename} did not match expected content");
|
||||
|
||||
matches++;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Testing;
|
||||
using Microsoft.CodeAnalysis.Testing;
|
||||
using Microsoft.CodeAnalysis.Testing.Verifiers;
|
||||
using osu.Framework.SourceGeneration.Generators;
|
||||
|
||||
namespace osu.Framework.SourceGeneration.Tests.Verifiers
|
||||
@@ -14,14 +14,11 @@ namespace osu.Framework.SourceGeneration.Tests.Verifiers
|
||||
public partial class CSharpSourceGeneratorVerifier<TSourceGenerator>
|
||||
where TSourceGenerator : AbstractIncrementalGenerator, new()
|
||||
{
|
||||
public class Test : CSharpSourceGeneratorTest<EmptySourceGeneratorProvider, XUnitVerifier>
|
||||
public class Test : CSharpSourceGeneratorTest<EmptySourceGeneratorProvider, DefaultVerifier>
|
||||
{
|
||||
public LanguageVersion LanguageVersion { get; set; } = LanguageVersion.Default;
|
||||
|
||||
protected override IEnumerable<ISourceGenerator> GetSourceGenerators() => new[]
|
||||
{
|
||||
new TSourceGenerator { ForceRun = true }.AsSourceGenerator()
|
||||
};
|
||||
protected override IEnumerable<Type> GetSourceGenerators() => [typeof(TSourceGenerator)];
|
||||
|
||||
protected override ParseOptions CreateParseOptions()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit" Version="1.1.2" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||
<PackageReference Include="xunit" Version="2.9.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
|
||||
|
||||
Reference in New Issue
Block a user