Skip to content

Commit 8b07915

Browse files
committed
bugfix: false positive on expressions containing Count
1 parent 52d3795 commit 8b07915

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FluentAssertions.Analyzers.Tests/Tips/CollectionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public class CollectionTests
329329
[AssertionDiagnostic(@"var array = new string[1, 1]; array.Length.Should().Be(0{0});")]
330330
[AssertionDiagnostic(@"var array = new string[2, 2]; array.Length.Should().Be(0{0});")]
331331
[AssertionDiagnostic(@"var array = new string[3, 3, 3]; array.Length.Should().Be(0{0});")]
332-
[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});")]
332+
[AssertionDiagnostic(@"int[] array1 = [1, 2, 3]; int[] array2 = [4, 5, 6]; int[] both = [..array1, ..array2]; (array1.Length + array2.Length).Should().Be(both.Length{0});")]
333333
[Implemented(Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/309")]
334334
public void CollectionShouldHaveCount_LengthShouldBe_TestNoAnalyzer(string assertion) => DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(new StringBuilder()
335335
.AppendLine("using System;")

0 commit comments

Comments
 (0)