add bug info
[mcs.git] / tests / gtest-214.cs
blob01bc6f32200d238680cac48bc874dac7c3ed178e
1 //
2 // Test to check that in the 2.x profile, we add the RuntimeCompatibilityAttribute
3 // if none is specified. Bug 76364
4 //
5 using System;
6 using System.Reflection;
7 using System.Runtime.CompilerServices;
9 class X {
10 static int Main ()
12 object [] attrs = typeof (X).Assembly.GetCustomAttributes (true);
14 foreach (object o in attrs){
15 if (o is RuntimeCompatibilityAttribute){
16 RuntimeCompatibilityAttribute a = (RuntimeCompatibilityAttribute) o;
18 if (a.WrapNonExceptionThrows)
19 return 0;
23 // failed, did not find the attribute
24 return 1;