public void Constructors51_Test() { //Ported from Const51.cs OutputHelper.WriteLine("Section 10.9"); OutputHelper.WriteLine("The scope of the parameters given by the formal"); OutputHelper.WriteLine("parameter list of a constructor includes the"); OutputHelper.WriteLine("constructor initializer of that declaration."); OutputHelper.WriteLine("Thus, a constructor initializer is permitted to"); OutputHelper.WriteLine("access the parameters of the constructor."); Assert.True(ConstructorsTestClass51.testMethod()); }
public static bool testMethod() { ConstructorsTestClass51 test = new ConstructorsTestClass51(5, 3); if (test.intI == 22) { return(true); } else { return(false); } }
public MFTestResults Constructors51_Test() { //Ported from Const51.cs Log.Comment("Section 10.9"); Log.Comment("The scope of the parameters given by the formal"); Log.Comment("parameter list of a constructor includes the"); Log.Comment("constructor initializer of that declaration."); Log.Comment("Thus, a constructor initializer is permitted to"); Log.Comment("access the parameters of the constructor."); if (ConstructorsTestClass51.testMethod()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }
public static bool testMethod() { ConstructorsTestClass51 test = new ConstructorsTestClass51(5, 3); if (test.intI == 22) { return true; } else { return false; } }