Description
With Assert.That, specifying an IEqualityComparer makes it AOT-safe and suppresses the warning, but Should still produces the warning.
Expected Behavior
No IL2026
Actual Behavior
Raise IL2026
Steps to Reproduce
await Assert.That(new int[2]).IsEquivalentTo([0, 0]); // OK: IL2026
await Assert.That(new int[2]).IsEquivalentTo([0, 0], EqualityComparer<int>.Default); // OK: No warning
await new int[2].Should().BeEquivalentTo([0, 0]); // OK: IL2026
await new int[2].Should().BeEquivalentTo([0, 0], EqualityComparer<int>.Default); // NG: IL2026.
TUnit Version
1.43.11
.NET Version
.NET 10
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
Description
With
Assert.That, specifying anIEqualityComparermakes it AOT-safe and suppresses the warning, butShouldstill produces the warning.Expected Behavior
No
IL2026Actual Behavior
Raise
IL2026Steps to Reproduce
TUnit Version
1.43.11
.NET Version
.NET 10
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
dotnet testordotnet run, not just in my IDE