Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit fb94fc7

Browse files
marek-safarstephentoub
authored andcommitted
Simplifies ReadOnlySpan ArgumentNullException test (#25486)
1 parent 154859a commit fb94fc7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/System.Memory/tests/ReadOnlySpan/AsReadOnlySpan.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ public static void ObjectArrayAsReadOnlySpan()
3838
public static void NullArrayAsReadOnlySpan()
3939
{
4040
int[] a = null;
41-
ReadOnlySpan<int> span;
42-
TestHelpers.AssertThrows<ArgumentNullException, int>(span, _span => _span = a.AsReadOnlySpan());
41+
Assert.Throws<ArgumentNullException>(() => a.AsReadOnlySpan().DontBox());
4342
}
4443

4544
[Fact]

0 commit comments

Comments
 (0)