public void Fields24_testMethod()
 {
     OutputHelper.WriteLine(" Section 10.4");
     OutputHelper.WriteLine(" When a field-declaration includes a readonly");
     OutputHelper.WriteLine(" modifier, assignments to the fields introduced");
     OutputHelper.WriteLine(" by the declaration can only occur as part of");
     OutputHelper.WriteLine(" the declaration or in a constructor in the");
     OutputHelper.WriteLine(" same class.");
     Assert.True(FieldsTestClass24.testMethod());
 }
예제 #2
0
 public MFTestResults Fields24_testMethod()
 {
     Log.Comment(" Section 10.4");
     Log.Comment(" When a field-declaration includes a readonly");
     Log.Comment(" modifier, assignments to the fields introduced");
     Log.Comment(" by the declaration can only occur as part of");
     Log.Comment(" the declaration or in a constructor in the");
     Log.Comment(" same class.");
     if (FieldsTestClass24.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }