You've already forked linux-packaging-mono
Imported Upstream version 5.8.0.22
Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
parent
5f4a27cc8a
commit
7d05485754
@@ -160,14 +160,14 @@ namespace System.Security.Cryptography.Pkcs.Tests
|
||||
Assert.Throws<ArgumentNullException>(() => c.CopyTo(null, 0));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => c.CopyTo(a, -1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => c.CopyTo(a, 3));
|
||||
Assert.Throws<ArgumentException>(() => c.CopyTo(a, 1));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => c.CopyTo(a, 1));
|
||||
|
||||
ICollection ic = c;
|
||||
Assert.Throws<ArgumentNullException>(() => ic.CopyTo(null, 0));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => ic.CopyTo(a, -1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => ic.CopyTo(a, 3));
|
||||
Assert.Throws<ArgumentException>(() => ic.CopyTo(a, 1));
|
||||
Assert.Throws<ArgumentException>(() => ic.CopyTo(new CmsRecipient[2, 2], 1));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => ic.CopyTo(a, 1));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => ic.CopyTo(new CmsRecipient[2, 2], 1));
|
||||
Assert.Throws<InvalidCastException>(() => ic.CopyTo(new int[10], 1));
|
||||
|
||||
if (PlatformDetection.IsNonZeroLowerBoundArraySupported)
|
||||
|
||||
@@ -152,14 +152,14 @@ namespace System.Security.Cryptography.Pkcs.Tests
|
||||
Assert.Throws<ArgumentNullException>(() => c.CopyTo(null, 0));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => c.CopyTo(a, -1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => c.CopyTo(a, 3));
|
||||
Assert.Throws<ArgumentException>(() => c.CopyTo(a, 1));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => c.CopyTo(a, 1));
|
||||
|
||||
ICollection ic = c;
|
||||
Assert.Throws<ArgumentNullException>(() => ic.CopyTo(null, 0));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => ic.CopyTo(a, -1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => ic.CopyTo(a, 3));
|
||||
Assert.Throws<ArgumentException>(() => ic.CopyTo(a, 1));
|
||||
Assert.Throws<ArgumentException>(() => ic.CopyTo(new CryptographicAttributeObject[2, 2], 0));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => ic.CopyTo(a, 1));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => ic.CopyTo(new CryptographicAttributeObject[2, 2], 0));
|
||||
Assert.Throws<InvalidCastException>(() => ic.CopyTo(new int[10], 0));
|
||||
|
||||
if (PlatformDetection.IsNonZeroLowerBoundArraySupported)
|
||||
|
||||
@@ -124,6 +124,7 @@ namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests
|
||||
|
||||
[Fact]
|
||||
[OuterLoop(/* Leaks key on disk if interrupted */)]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RC4 isn't available via CNG, and CNG is the only library available to UWP")]
|
||||
public static void Rc4AndCngWrappersDontMixTest()
|
||||
{
|
||||
//
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
|
||||
|
||||
AsnEncodedData a = new AsnEncodedData(oid, new byte[3]);
|
||||
object ign;
|
||||
Assert.Throws<ArgumentException>(() => ign = new Pkcs9AttributeObject(a));
|
||||
AssertExtensions.Throws<ArgumentException>("oid.Value", () => ign = new Pkcs9AttributeObject(a));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -74,7 +74,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
|
||||
Pkcs9AttributeObject p = new Pkcs9AttributeObject();
|
||||
byte[] rawData = "041e4d00790020004400650073006300720069007000740069006f006e000000".HexToByteArray();
|
||||
AsnEncodedData a = new AsnEncodedData(Oids.DocumentName, rawData);
|
||||
Assert.Throws<ArgumentException>(() => p.CopyFrom(a));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => p.CopyFrom(a));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -114,16 +114,16 @@ namespace System.Security.Cryptography.Pkcs.Tests
|
||||
RecipientInfo[] recipients = new RecipientInfo[6];
|
||||
|
||||
col.CopyTo(recipients, 3);
|
||||
Assert.Throws<ArgumentException>(() => col.CopyTo(recipients, 4));
|
||||
AssertExtensions.Throws<ArgumentException>("destinationArray", null, () => col.CopyTo(recipients, 4));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => col.CopyTo(recipients, -1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => col.CopyTo(recipients, 6));
|
||||
|
||||
ICollection ic = col;
|
||||
Assert.Throws<ArgumentException>(() => ic.CopyTo(recipients, 4));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => ic.CopyTo(recipients, 4));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => ic.CopyTo(recipients, -1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => ic.CopyTo(recipients, 6));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => ic.CopyTo(recipients, 6));
|
||||
Assert.Throws<ArgumentException>(() => ic.CopyTo(new RecipientInfo[2, 2], 0));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => ic.CopyTo(new RecipientInfo[2, 2], 0));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -136,7 +136,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
|
||||
RecipientInfo[] recipients = new RecipientInfo[6];
|
||||
|
||||
col.CopyTo(recipients, 3);
|
||||
Assert.Throws<ArgumentException>(() => col.CopyTo(recipients, 4));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => col.CopyTo(recipients, 4));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => col.CopyTo(recipients, -1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => col.CopyTo(recipients, 6));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user