Merge pull request #5198 from BrzVlad/fix-binprot-stats
[mono.git] / mono / tests / internalsvisibleto-compilertest.cs
index c38fb0d918551bc26994763d7022e60c55639264..196627e73e9792764c91750697685a549261a9b3 100755 (executable)
@@ -1,5 +1,11 @@
 using System;
 
+#if SIGN2048
+using System.Reflection;
+[assembly: AssemblyDelaySign(true)]
+[assembly: AssemblyKeyFile(@"internalsvisibleto-2048.snk")]
+#endif
+
 namespace InternalsVisibleTo {
     class Program {
         static void Main (string[] args) {
@@ -7,6 +13,15 @@ namespace InternalsVisibleTo {
 
             Console.WriteLine("-- Correct case --");
 
+           try {
+                   var a = new CorrectCaseFriendAssembly.PublicClass ();
+                   a.InternalMethod ();
+                   Console.WriteLine ("Access friend internal method: OK");
+           } catch (MemberAccessException) {
+                   failCount += 1;
+                   Console.WriteLine ("Access friend internal method: Fail");
+           }
+
             try {
                 var a = new CorrectCaseFriendAssembly.InternalClass(@internal: 0);
                 Console.WriteLine("Access internal class internal ctor: OK");