Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Jan 19, 2025
1 parent 953b2bb commit f74cf8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Roslynator.CSharp.CodeFixes;
using Roslynator.Testing;
using Roslynator.Testing.CSharp;
using Xunit;

Expand All @@ -13,14 +12,6 @@ public class RCS1004RemoveBracesFromIfElseTests : AbstractCSharpDiagnosticVerifi
{
public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.RemoveBracesFromIfElse;

[Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.RemoveBracesFromIfElse)]
public async Task Testt()
{
await VerifyDiagnosticAsync(
new TestFile("namespace N;", path: "Features/Feature.cs"),
[ new AdditionalFile("namespace M;", path: "Features/Feature2.cs"), new AdditionalFile("namespace O;", path: "Features/Feature3.cs") ]);
}

[Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.RemoveBracesFromIfElse)]
public async Task Test()
{
Expand Down
5 changes: 2 additions & 3 deletions src/Tests/Testing.Common/Testing/DiagnosticVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,8 @@ public async Task VerifyDiagnosticAndFixAsync(
if (file.ExpectedSource is null)
throw new ArgumentException("Expected source is required.", nameof(file));

TestCode code = TestCode.Parse(file.Source);

ExpectedTestState expected = ExpectedTestState.Parse(file.ExpectedSource);
var code = TestCode.Parse(file.Source);
var expected = ExpectedTestState.Parse(file.ExpectedSource);

var data = new DiagnosticTestData(
code.Value,
Expand Down

0 comments on commit f74cf8f

Please sign in to comment.