public void Fields42_testMethod() { OutputHelper.WriteLine(" Section 10.4"); OutputHelper.WriteLine(" Field declarations may include variable-initializers."); OutputHelper.WriteLine(" For static fields, varaible initializers correspond to"); OutputHelper.WriteLine(" assignment statements that are executed when the class"); OutputHelper.WriteLine(" is loaded. For instance fields, variable initializers"); OutputHelper.WriteLine(" correspond to assignment statements that are executed"); OutputHelper.WriteLine(" when an instance of the class is created."); OutputHelper.WriteLine("This test has been rewritten to avoid use of the Math.Abs function which the MF does not support"); Assert.True(FieldsTestClass42.testMethod()); }
public MFTestResults Fields42_testMethod() { Log.Comment(" Section 10.4"); Log.Comment(" Field declarations may include variable-initializers."); Log.Comment(" For static fields, varaible initializers correspond to"); Log.Comment(" assignment statements that are executed when the class"); Log.Comment(" is loaded. For instance fields, variable initializers"); Log.Comment(" correspond to assignment statements that are executed"); Log.Comment(" when an instance of the class is created."); Log.Comment("This test has been rewritten to avoid use of the Math.Abs function which the MF does not support"); if (FieldsTestClass42.testMethod()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }
public static bool testMethod() { try { FieldsTestClass42 t = new FieldsTestClass42(); if ((x == (int)0.99939082701909573000624344004393) && (t.i == 100) && (t.s.Equals("Hello"))) { return(true); } else { return(false); } } catch { return(false); } }
public static bool testMethod() { try { FieldsTestClass42 t = new FieldsTestClass42(); if ((x == Math.Cos(2)) && (t.i == 100) && (t.s.Equals("Hello"))) { return(true); } else { return(false); } } catch { return(false); } }
public static bool testMethod() { try { FieldsTestClass42 t = new FieldsTestClass42(); if ((x == Math.Cos(2)) && (t.i == 100) && (t.s.Equals("Hello"))) { return true; } else { return false; } } catch { return false; } }