|
5 | 5 | using System;
|
6 | 6 | using System.Diagnostics.CodeAnalysis;
|
7 | 7 | using System.Runtime.CompilerServices;
|
| 8 | +using Microsoft.Toolkit.HighPerformance.Enumerables; |
8 | 9 | using Microsoft.Toolkit.HighPerformance.Extensions;
|
9 | 10 | using Microsoft.Toolkit.HighPerformance.Memory;
|
10 | 11 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
@@ -246,9 +247,11 @@ public void Test_ArrayExtensions_2D_GetRowOrColumn_Helpers()
|
246 | 247 |
|
247 | 248 | CollectionAssert.AreEqual(copy, result);
|
248 | 249 |
|
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>))); |
250 | 252 |
|
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>))); |
252 | 255 |
|
253 | 256 | Assert.IsTrue(array.GetRow(2).TryCopyTo(copy));
|
254 | 257 |
|
@@ -311,9 +314,11 @@ public void Test_ArrayExtensions_2D_ReadOnlyGetRowOrColumn_Helpers()
|
311 | 314 |
|
312 | 315 | CollectionAssert.AreEqual(copy, result);
|
313 | 316 |
|
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>))); |
315 | 319 |
|
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>))); |
317 | 322 |
|
318 | 323 | Assert.IsTrue(span2D.GetRow(2).TryCopyTo(copy));
|
319 | 324 |
|
|
0 commit comments