Comment out 362 until 74565 is fixed
[mono.git] / mcs / tests / cond-attr.cs
1 #define DEBUG
2
3 using System;
4 using System.Diagnostics;
5
6 [Conditional("DEBUG")]
7 public class TestAttribute : Attribute {}
8
9 [Conditional("RELEASE")]
10 public class TestNotAttribute : Attribute {}
11
12 [Conditional("A")]
13 [Conditional("DEBUG")]    
14 [Conditional("B")]
15 public class TestMultiAttribute : Attribute {}
16     
17 // TestAttribute is included
18 [Test]                          
19 class Class1 {}
20     
21 // TestNotAttribute is not included
22 [TestNot]                       
23 class Class2 {}
24
25 // Is included    
26 [TestMulti]
27 class Class3 {}
28
29
30 public class TestClass
31 {
32     public static int Main ()
33     {
34         if (Attribute.GetCustomAttributes (typeof (Class1)).Length != 1)
35                 return 1;
36
37         if (Attribute.GetCustomAttributes (typeof (Class2)).Length != 0)
38                 return 1;
39
40         if (Attribute.GetCustomAttributes (typeof (Class3)).Length != 1)
41                 return 1;
42         
43         Console.WriteLine ("OK");
44         return 0;
45     }
46 }