From 5fd6a8fcf11a6f89f4b2320c6bfe54d8a5f242f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Hellander?= Date: Wed, 15 Nov 2023 20:01:06 +0100 Subject: [PATCH] Improve coverage for SA1131 by updating tests so they pass for the right reason --- .../ReadabilityRules/SA1131UnitTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1131UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1131UnitTests.cs index 72cd1013f..c6d55f217 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1131UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1131UnitTests.cs @@ -373,7 +373,7 @@ public class TypeName public void Test() {{ int j = 6; - bool b = j {@operator} i; + bool b = i {@operator} j; }} }}"; await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); @@ -396,7 +396,7 @@ public class TypeName public void Test() {{ int j = 6; - bool b = j {@operator} i; + bool b = i {@operator} j; }} }}"; await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); @@ -419,7 +419,7 @@ public class TypeName public void Test() {{ int j = 6; - bool b = j {@operator} i; + bool b = i {@operator} j; }} }}"; await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);