Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / gtest-444.cs
blobb41f4affb8b556fe1ef01b817f2f2bcc692f0340
1 using System;
2 using System.Reflection;
4 [assembly: AssemblyKeyFileAttribute ("test-715.snk")]
5 [assembly: AssemblyFlags (AssemblyNameFlags.EnableJITcompileOptimizer | AssemblyNameFlags.Retargetable)]
7 class MyClass
9 public static int Main ()
11 Assembly thisAsm = Assembly.GetExecutingAssembly ();
12 AssemblyName name = thisAsm.GetName (false);
14 if (name.Flags != (AssemblyNameFlags.EnableJITcompileOptimizer | AssemblyNameFlags.Retargetable | AssemblyNameFlags.PublicKey))
15 return 1;
17 byte[] key = name.GetPublicKey ();
18 if (key.Length != 160)
19 return 2;
21 if (key [56] != 170)
22 return 3;
24 if (name.HashAlgorithm != System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA1)
25 return 4;
27 // if (name.ProcessorArchitecture != ProcessorArchitecture.MSIL)
28 // return 5;
30 if (name.VersionCompatibility != System.Configuration.Assemblies.AssemblyVersionCompatibility.SameMachine)
31 return 6;
33 Console.WriteLine ("OK");
34 return 0;