Skip to content

Commit a90866d

Browse files
committed
Fixed a build error in the unit tests
1 parent 1a15ee2 commit a90866d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ArrayExtensions.2D.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System;
66
using System.Diagnostics.CodeAnalysis;
77
using System.Runtime.CompilerServices;
8+
using Microsoft.Toolkit.HighPerformance.Enumerables;
89
using Microsoft.Toolkit.HighPerformance.Extensions;
910
using Microsoft.Toolkit.HighPerformance.Memory;
1011
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -246,9 +247,11 @@ public void Test_ArrayExtensions_2D_GetRowOrColumn_Helpers()
246247

247248
CollectionAssert.AreEqual(copy, result);
248249

249-
Assert.ThrowsException<ArgumentException>(() => array.GetRow(0).CopyTo(default));
250+
Assert.ThrowsException<ArgumentException>(() => array.GetRow(0).CopyTo(default(RefEnumerable<int>)));
251+
Assert.ThrowsException<ArgumentException>(() => array.GetRow(0).CopyTo(default(Span<int>)));
250252

251-
Assert.ThrowsException<ArgumentException>(() => array.GetColumn(0).CopyTo(default));
253+
Assert.ThrowsException<ArgumentException>(() => array.GetColumn(0).CopyTo(default(RefEnumerable<int>)));
254+
Assert.ThrowsException<ArgumentException>(() => array.GetColumn(0).CopyTo(default(Span<int>)));
252255

253256
Assert.IsTrue(array.GetRow(2).TryCopyTo(copy));
254257

@@ -311,9 +314,11 @@ public void Test_ArrayExtensions_2D_ReadOnlyGetRowOrColumn_Helpers()
311314

312315
CollectionAssert.AreEqual(copy, result);
313316

314-
Assert.ThrowsException<ArgumentException>(() => ((ReadOnlySpan2D<int>)array).GetRow(0).CopyTo(default));
317+
Assert.ThrowsException<ArgumentException>(() => ((ReadOnlySpan2D<int>)array).GetRow(0).CopyTo(default(RefEnumerable<int>)));
318+
Assert.ThrowsException<ArgumentException>(() => ((ReadOnlySpan2D<int>)array).GetRow(0).CopyTo(default(Span<int>)));
315319

316-
Assert.ThrowsException<ArgumentException>(() => ((ReadOnlySpan2D<int>)array).GetColumn(0).CopyTo(default));
320+
Assert.ThrowsException<ArgumentException>(() => ((ReadOnlySpan2D<int>)array).GetColumn(0).CopyTo(default(RefEnumerable<int>)));
321+
Assert.ThrowsException<ArgumentException>(() => ((ReadOnlySpan2D<int>)array).GetColumn(0).CopyTo(default(Span<int>)));
317322

318323
Assert.IsTrue(span2D.GetRow(2).TryCopyTo(copy));
319324

0 commit comments

Comments
 (0)