Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Testing;
using Microsoft.CodeAnalysis.Testing.Verifiers;
using Microsoft.CodeAnalysis.Text;
using Uno.UI.SourceGenerators.DependencyObject;
using Uno.UI.SourceGenerators.Tests.Verifiers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ο»Ώusing Microsoft.CodeAnalysis.Testing;
using Uno.UI.SourceGenerators.DependencyObject;
using Microsoft.CodeAnalysis.Testing.Verifiers;
using Uno.UI.SourceGenerators.Tests.Verifiers;
using System.Collections.Immutable;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
<ImplicitUsings>enable</ImplicitUsings>
<EnableAutomaticXamlPageInclusion>false</EnableAutomaticXamlPageInclusion>
<OutputType>Exe</OutputType>
<!-- To be able to get newer versions of Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.MSTest -->
<!-- that are not yet published to NuGet.org -->
<!-- The latest on NuGet.org doesn't have the fix from https://github.com/dotnet/roslyn-sdk/pull/988 -->
<!-- which is very important for us -->
<RestoreAdditionalProjectSources Condition="'$(UNO_UWP_BUILD)'=='false'">https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json</RestoreAdditionalProjectSources>

<!-- We need all the intermediate assemblies -->
<DisablePrivateProjectReference>true</DisablePrivateProjectReference>
Expand Down Expand Up @@ -47,7 +42,7 @@
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.13.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Features" Version="4.13.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.13.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.MSTest" Version="1.1.2" Condition="'$(UNO_UWP_BUILD)'=='false'" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" Condition="'$(UNO_UWP_BUILD)'=='false'" />
<PackageReference Include="AwesomeAssertions" />
<PackageReference Include="CommunityToolkit.Mvvm" Condition="'$(UNO_UWP_BUILD)'=='false'" />
<PackageReference Include="NuGet.Packaging" Version="6.3.4" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ο»Ώusing Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Testing.Verifiers;
using Microsoft.CodeAnalysis.Testing;
using Microsoft.CodeAnalysis.Diagnostics;
using System.Collections.Immutable;
Expand All @@ -13,9 +12,7 @@ namespace Uno.UI.SourceGenerators.Tests.Verifiers
public static partial class CSharpSourceGeneratorVerifier<TSourceGenerator>
where TSourceGenerator : ISourceGenerator, new()
{
#pragma warning disable CS0618 // Type or member is obsolete
public class Test : CSharpSourceGeneratorTest<TSourceGenerator, MSTestVerifier>
#pragma warning restore CS0618 // Type or member is obsolete
public class Test : CSharpSourceGeneratorTest<TSourceGenerator, DefaultVerifier>
{
public LanguageVersion LanguageVersion { get; set; } = LanguageVersion.Default;
public bool IgnoreAccessibility { get; set; }
Expand Down
8 changes: 1 addition & 7 deletions src/Uno.Analyzers.Tests/Uno.Analyzers.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
<CodeAnalysisVersionForAnalyzersTests>4.0.0</CodeAnalysisVersionForAnalyzersTests>

<!-- To be able to get newer versions of Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.MSTest -->
<!-- that are not yet published to NuGet.org -->
<!-- The latest on NuGet.org doesn't have the fix from https://github.com/dotnet/roslyn-sdk/pull/988 -->
<!-- which is very important for us -->
<RestoreAdditionalProjectSources>https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json</RestoreAdditionalProjectSources>
</PropertyGroup>

<ItemGroup>
Expand All @@ -24,7 +18,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(CodeAnalysisVersionForAnalyzersTests)" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(CodeAnalysisVersionForAnalyzersTests)" />

<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.MSTest" Version="1.1.2-beta1.23578.3" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.2" />

<PackageReference Include="NuGet.Packaging" Version="6.0.2" />
<PackageReference Include="System.Formats.Asn1" Version="6.0.1" />
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.Analyzers.Tests/Verifiers/CSCodeFix+Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing.Verifiers;
using Microsoft.CodeAnalysis.Testing;

namespace Uno.Analyzers.Tests.Verifiers
{
Expand All @@ -14,7 +14,7 @@ public static partial class CSharpCodeFixVerifier<TAnalyzer, TCodeFix>
where TAnalyzer : DiagnosticAnalyzer, new()
where TCodeFix : CodeFixProvider, new()
{
public class Test : CSharpCodeFixTest<TAnalyzer, TCodeFix, MSTestVerifier>
public class Test : CSharpCodeFixTest<TAnalyzer, TCodeFix, DefaultVerifier>
{
public Test()
{
Expand Down
7 changes: 3 additions & 4 deletions src/Uno.Analyzers.Tests/Verifiers/CSCodeFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing.Verifiers;
using Microsoft.CodeAnalysis.Testing;
using Microsoft.CodeAnalysis;

Expand All @@ -16,15 +15,15 @@ public static partial class CSharpCodeFixVerifier<TAnalyzer, TCodeFix>
{
/// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic()"/>
public static DiagnosticResult Diagnostic()
=> CSharpCodeFixVerifier<TAnalyzer, TCodeFix, MSTestVerifier>.Diagnostic();
=> CSharpCodeFixVerifier<TAnalyzer, TCodeFix>.Diagnostic();

/// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic(string)"/>
public static DiagnosticResult Diagnostic(string diagnosticId)
=> CSharpCodeFixVerifier<TAnalyzer, TCodeFix, MSTestVerifier>.Diagnostic(diagnosticId);
=> CSharpCodeFixVerifier<TAnalyzer, TCodeFix>.Diagnostic(diagnosticId);

/// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic(DiagnosticDescriptor)"/>
public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor)
=> CSharpCodeFixVerifier<TAnalyzer, TCodeFix, MSTestVerifier>.Diagnostic(descriptor);
=> CSharpCodeFixVerifier<TAnalyzer, TCodeFix>.Diagnostic(descriptor);

/// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.VerifyAnalyzerAsync(string, DiagnosticResult[])"/>
public static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected)
Expand Down
Loading