You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tests/NFUnitTestTypes/UnitTestsSpanByte.cs
+27-27Lines changed: 27 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -13,67 +13,67 @@ public class UnitTestsSpanByte
13
13
publicvoidEmptySpanTests()
14
14
{
15
15
// Empty span
16
-
SpanBytespan=SpanByte.Empty;
16
+
Spanspan=Span.Empty;
17
17
// Create a destination span larger
18
-
SpanBytedestination=newbyte[1];
18
+
Spandestination=newbyte[1];
19
19
span.CopyTo(destination);
20
20
21
21
// Now also empty
22
-
destination=SpanByte.Empty;
22
+
destination=Span.Empty;
23
23
span.CopyTo(destination);
24
24
}
25
25
26
26
[TestMethod]
27
27
publicvoidRaisingExceptionsOfAllKindsTests()
28
28
{
29
29
// Should raise an exception on creation
30
-
Assert.ThrowsException(typeof(ArgumentOutOfRangeException),()=>{SpanBytespan=newSpanByte(null,1,2);},"ArgumentOutOfRangeException when array is null, start is 1 and length is 2");
31
-
Assert.ThrowsException(typeof(ArgumentOutOfRangeException),()=>{SpanBytespan=newSpanByte(newbyte[1],1,2);},"ArgumentOutOfRangeException when array is new byte[1], start is 1 and length is 2");
32
-
Assert.ThrowsException(typeof(ArgumentOutOfRangeException),()=>{SpanBytespan=newSpanByte(newbyte[1],0,2);},"ArgumentOutOfRangeException when array is new byte[1], start is 0 and length is 2");
33
-
Assert.ThrowsException(typeof(ArgumentOutOfRangeException),()=>{SpanBytespan=newSpanByte(newbyte[1],2,0);},"ArgumentOutOfRangeException when array is new byte[1], start is 2 and length is 0");
30
+
Assert.ThrowsException(typeof(ArgumentOutOfRangeException),()=>{Spanspan=newSpan(null,1,2);},"ArgumentOutOfRangeException when array is null, start is 1 and length is 2");
31
+
Assert.ThrowsException(typeof(ArgumentOutOfRangeException),()=>{Spanspan=newSpan(newbyte[1],1,2);},"ArgumentOutOfRangeException when array is new byte[1], start is 1 and length is 2");
32
+
Assert.ThrowsException(typeof(ArgumentOutOfRangeException),()=>{Spanspan=newSpan(newbyte[1],0,2);},"ArgumentOutOfRangeException when array is new byte[1], start is 0 and length is 2");
33
+
Assert.ThrowsException(typeof(ArgumentOutOfRangeException),()=>{Spanspan=newSpan(newbyte[1],2,0);},"ArgumentOutOfRangeException when array is new byte[1], start is 2 and length is 0");
/// Initializes a new instance of the <see cref="ArrayTypeMismatchException"/> class.
14
+
/// </summary>
15
+
publicArrayTypeMismatchException()
16
+
{
17
+
}
18
+
19
+
/// <summary>
20
+
/// Initializes a new instance of the <see cref="ArrayTypeMismatchException"/> class with a specified error message.
21
+
/// </summary>
22
+
/// <param name="message"></param>
23
+
publicArrayTypeMismatchException(string?message)
24
+
:base(message)
25
+
{
26
+
}
27
+
28
+
/// <summary>
29
+
/// Initializes a new instance of the <see cref="ArrayTypeMismatchException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
0 commit comments