Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bugfix: false positive on expressions containing Count
  • Loading branch information
Meir017 committed Oct 7, 2024
commit 8b07915a3e2e34bd4ed6605f3678a2951f9bba08
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 = array1.Concat(array2).ToArray(); (array1.Length + array2.Length).Should().Be(both.Length{0});")]
[AssertionDiagnostic(@"int[] array1 = [1, 2, 3]; int[] array2 = [4, 5, 6]; int[] both = [..array1, ..array2]; (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
Loading