Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2005-11-03 23:12:09 +0300
committerMarek Safar <marek.safar@gmail.com>2005-11-03 23:12:09 +0300
commit549ffd5ee55a56e6e09b25cc3dfaff6506d689f5 (patch)
treecd614db4dd9e45b734799d1cc8565178fbd7c58d /mcs/tests/test-311.cs
parent9089bc86dc27aed950fb23f51ea7be5b8dd87454 (diff)
more test cases
svn path=/trunk/mcs/; revision=52525
Diffstat (limited to 'mcs/tests/test-311.cs')
-rw-r--r--mcs/tests/test-311.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/mcs/tests/test-311.cs b/mcs/tests/test-311.cs
index 53bc649e66e..54c60fbf8a5 100644
--- a/mcs/tests/test-311.cs
+++ b/mcs/tests/test-311.cs
@@ -57,10 +57,12 @@ public class Program {
[SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.AllFlags, UnmanagedCode=true)]
static public int Main (string[] args)
{
+ // TODO: this will not be working for .NET 2.0 as attributes are decoded back
Type program = typeof (Program);
+
if (program.GetCustomAttributes (true).Length != 0)
return 1;
-
+
if (program.GetConstructor (System.Type.EmptyTypes).GetCustomAttributes (true).Length != 0)
return 2;
@@ -73,7 +75,17 @@ public class Program {
if (program.GetMethod ("Test2").GetCustomAttributes (true).Length != 0)
return 5;
- Console.WriteLine (Message);
+ Type test2 = typeof (Test2);
+ if (test2.GetCustomAttributes (true).Length != 0)
+ return 6;
+
+ Console.WriteLine ("OK");
return 0;
}
}
+
+[SecurityPermission (SecurityAction.Demand, ControlAppDomain=true)]
+public partial class Test2 {}
+
+[SecurityPermission (SecurityAction.Demand, ControlAppDomain=true)]
+public partial class Test2 {}