Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

47
mcs/tests/gtest-167.cs Normal file
View File

@@ -0,0 +1,47 @@
// Conditional attribute class test
#define DEBUG
using System;
using System.Diagnostics;
[Conditional("DEBUG")]
public class TestAttribute : Attribute {}
[Conditional("RELEASE")]
public class TestNotAttribute : Attribute {}
[Conditional("A")]
[Conditional("DEBUG")]
[Conditional("B")]
public class TestMultiAttribute : Attribute {}
// TestAttribute is included
[Test]
class Class1 {}
// TestNotAttribute is not included
[TestNot]
class Class2 {}
// Is included
[TestMulti]
class Class3 {}
public class TestClass
{
public static int Main ()
{
if (Attribute.GetCustomAttributes (typeof (Class1)).Length != 1)
return 1;
if (Attribute.GetCustomAttributes (typeof (Class2)).Length != 0)
return 1;
if (Attribute.GetCustomAttributes (typeof (Class3)).Length != 1)
return 1;
Console.WriteLine ("OK");
return 0;
}
}