Skip to content

Commit 042ac4f

Browse files
committed
Remove an unnecessary condition to simplify test code
1 parent ba0e2bc commit 042ac4f

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1125CSharp7UnitTests.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,12 @@ class ClassName<T>
4444
}}
4545
}}
4646
";
47+
4748
string testCode = string.Format(template, longForm);
4849
string fixedCode = string.Format(template, shortForm);
4950

50-
if (testCode != fixedCode)
51-
{
52-
DiagnosticResult expected = this.CSharpDiagnostic().WithLocation(7, 36);
53-
await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
54-
}
55-
51+
DiagnosticResult expected = this.CSharpDiagnostic().WithLocation(7, 36);
52+
await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
5653
await this.VerifyCSharpDiagnosticAsync(fixedCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
5754
}
5855

0 commit comments

Comments
 (0)