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
fix(tests): correct Memory/ReadOnlyMemory assertion type refs (#5696)
MemoryAssertion<T> and ReadOnlyMemoryAssertion<T> are only defined for
NET5_0_OR_GREATER, so the two tests referencing them failed to compile on
net472. Wrap those two tests in the matching preprocessor guard so net472
builds succeed while keeping full coverage on modern TFMs.
  • Loading branch information
thomhurst committed Apr 24, 2026
commit 02e9e7d5b1b3a90f32ab14b2725580ab9b74d9bd
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public async Task DictionaryOfStringInt_RoutesToMutableDictionaryAssertion()
await Assert.That(assertion).IsTypeOf<MutableDictionaryAssertion<string, int>>();
}

#if NET5_0_OR_GREATER
[Test]
public async Task MemoryOfChar_RoutesToMemoryAssertion()
{
Expand All @@ -200,6 +201,7 @@ public async Task ReadOnlyMemoryOfChar_RoutesToReadOnlyMemoryAssertion()
var assertion = Assert.That(mem);
await Assert.That(assertion).IsTypeOf<ReadOnlyMemoryAssertion<char>>();
}
#endif

// ============ Delegate / Task overloads unchanged ============

Expand Down
Loading