Skip to content

Commit

Permalink
bugfix: false positive on expressions containing Count
Browse files Browse the repository at this point in the history
  • Loading branch information
Meir017 committed Oct 7, 2024
1 parent f919693 commit 52d3795
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public class CollectionTests
[AssertionDiagnostic(@"var array = new string[1, 1]; array.Length.Should().Be(0{0});")]
[AssertionDiagnostic(@"var array = new string[2, 2]; array.Length.Should().Be(0{0});")]
[AssertionDiagnostic(@"var array = new string[3, 3, 3]; array.Length.Should().Be(0{0});")]
[AssertionDiagnostic(@"int[] array1 = [1, 2, 3]; int[] array2 = [4, 5, 6]; var both = x.Concat(y).ToArray(); (array1.Length + array2.Length).Should().Be(both.Length{0});")]
[AssertionDiagnostic(@"int[] array1 = [1, 2, 3]; int[] array2 = [4, 5, 6]; var both = array1.Concat(array2).ToArray(); (array1.Length + array2.Length).Should().Be(both.Length{0});")]
[Implemented(Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/309")]
public void CollectionShouldHaveCount_LengthShouldBe_TestNoAnalyzer(string assertion) => DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(new StringBuilder()
.AppendLine("using System;")
Expand Down

0 comments on commit 52d3795

Please sign in to comment.