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
@@ -1862,6 +1862,26 @@ public class AssemblyNameTest {
|
||||
|
||||
Assert.AreEqual ("", an.CultureName);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDecodingEcmaKey ()
|
||||
{
|
||||
var x = new AssemblyName( "System, PublicKey=00000000000000000400000000000000" );
|
||||
Assert.IsNull (x.GetPublicKey (), "#1");
|
||||
Assert.IsNotNull (x.GetPublicKeyToken (), "#2");
|
||||
|
||||
var t = x.GetPublicKeyToken ();
|
||||
Assert.AreEqual (8, t.Length, "#3");
|
||||
|
||||
Assert.AreEqual (0xB7, t [0], "#4.0");
|
||||
Assert.AreEqual (0x7A, t [1], "#4.1");
|
||||
Assert.AreEqual (0x5C, t [2], "#4.2");
|
||||
Assert.AreEqual (0x56, t [3], "#4.3");
|
||||
Assert.AreEqual (0x19, t [4], "#4.4");
|
||||
Assert.AreEqual (0x34, t [5], "#4.5");
|
||||
Assert.AreEqual (0xE0, t [6], "#4.6");
|
||||
Assert.AreEqual (0x89, t [7], "#4.7");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -502,20 +502,17 @@ namespace MonoTests.System.Reflection
|
||||
public void GetReferencedAssemblies ()
|
||||
{
|
||||
Assembly corlib_test = Assembly.GetExecutingAssembly ();
|
||||
AssemblyName[] names = corlib_test.GetReferencedAssemblies ();
|
||||
foreach (AssemblyName an in names) {
|
||||
Assert.IsNull (an.CodeBase, "CodeBase");
|
||||
Assert.IsNotNull (an.CultureInfo, "CultureInfo");
|
||||
Assert.IsNull (an.EscapedCodeBase, "EscapedCodeBase");
|
||||
Assert.AreEqual (AssemblyNameFlags.None, an.Flags, "Flags");
|
||||
Assert.IsNotNull (an.FullName, "FullName");
|
||||
Assert.AreEqual (AssemblyHashAlgorithm.SHA1, an.HashAlgorithm, "HashAlgorithm");
|
||||
Assert.IsNull (an.KeyPair, "KeyPair");
|
||||
Assert.IsNotNull (an.Name, "Name");
|
||||
Assert.IsNotNull (an.Version, "Version");
|
||||
Assert.AreEqual (AssemblyVersionCompatibility.SameMachine,
|
||||
an.VersionCompatibility, "VersionCompatibility");
|
||||
}
|
||||
AssemblyName an = corlib_test.GetReferencedAssemblies ().First (l => l.Name == "mscorlib");
|
||||
Assert.IsNull (an.CodeBase, "CodeBase");
|
||||
Assert.IsNotNull (an.CultureInfo, "CultureInfo");
|
||||
Assert.IsNull (an.EscapedCodeBase, "EscapedCodeBase");
|
||||
Assert.AreEqual (AssemblyNameFlags.None, an.Flags, "Flags");
|
||||
Assert.IsNotNull (an.FullName, "FullName");
|
||||
Assert.AreEqual (AssemblyHashAlgorithm.SHA1, an.HashAlgorithm, "HashAlgorithm");
|
||||
Assert.IsNull (an.KeyPair, "KeyPair");
|
||||
Assert.IsNotNull (an.Name, "Name");
|
||||
Assert.IsNotNull (an.Version, "Version");
|
||||
Assert.AreEqual (AssemblyVersionCompatibility.SameMachine, an.VersionCompatibility, "VersionCompatibility");
|
||||
}
|
||||
|
||||
#if !MONOTOUCH && !FULL_AOT_RUNTIME // Reflection.Emit is not supported.
|
||||
|
Reference in New Issue
Block a user