public void Attrib_attrib047_5_Test() { OutputHelper.WriteLine(" Make sure that ObsoleteAttribute works with following targets"); OutputHelper.WriteLine("[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |"); OutputHelper.WriteLine(" AttributeTargets.Enum | AttributeTargets.Constructor |"); OutputHelper.WriteLine(" AttributeTargets.Method | AttributeTargets.Property |"); OutputHelper.WriteLine(" AttributeTargets.Field | AttributeTargets.Event |"); OutputHelper.WriteLine(" AttributeTargets.Interface | AttributeTargets.Delegate)]"); Assert.True(Attrib_TestClass_attrib047_5.testMethod()); }
public MFTestResults Attrib_attrib047_5_Test() { Log.Comment(" Make sure that ObsoleteAttribute works with following targets"); Log.Comment("[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |"); Log.Comment(" AttributeTargets.Enum | AttributeTargets.Constructor |"); Log.Comment(" AttributeTargets.Method | AttributeTargets.Property |"); Log.Comment(" AttributeTargets.Field | AttributeTargets.Event |"); Log.Comment(" AttributeTargets.Interface | AttributeTargets.Delegate)]"); if (Attrib_TestClass_attrib047_5.testMethod()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }
public static int Main_old() { Attrib_TestClass_attrib047_5 t = new Attrib_TestClass_attrib047_5(); Attrib_TestClass_attrib047_5_A a = new Attrib_TestClass_attrib047_5_A(); Attrib_TestClass_attrib047_5_A.S s = new Attrib_TestClass_attrib047_5_A.S(); a.Eve += new Attrib_TestClass_attrib047_5_A.Del(t.foo); a.foo(); int i = a.Prop; a.Prop = i; i = a.Field; Attrib_TestClass_attrib047_5_A.E e; return(0); }
public static int Main_old() { Attrib_TestClass_attrib047_5 t = new Attrib_TestClass_attrib047_5(); Attrib_TestClass_attrib047_5_A a = new Attrib_TestClass_attrib047_5_A(); Attrib_TestClass_attrib047_5_A.S s = new Attrib_TestClass_attrib047_5_A.S(); a.Eve += new Attrib_TestClass_attrib047_5_A.Del(t.foo); a.foo(); int i = a.Prop; a.Prop = i; i = a.Field; Attrib_TestClass_attrib047_5_A.E e; return 0; }