Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
            public static bool testMethod()
            {
                ConstructorsTestClass51 test = new ConstructorsTestClass51(5, 3);

                if (test.intI == 22)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
Exemplo n.º 3
0
 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;
     }
 }