コード例 #1
0
 public void Fields46_testMethod()
 {
     OutputHelper.WriteLine(" Section 10.4");
     OutputHelper.WriteLine(" The instance field variable initializers of a class");
     OutputHelper.WriteLine(" correspond to a sequence of assignments that are ");
     OutputHelper.WriteLine(" executed immediately upon entry to one of the instance");
     OutputHelper.WriteLine(" constructors of the class.");
     Assert.True(FieldsTestClass46.testMethod());
 }
コード例 #2
0
ファイル: FieldsTests.cs プロジェクト: leeholder/Netduino_SDK
 public MFTestResults Fields46_testMethod()
 {
     Log.Comment(" Section 10.4");
     Log.Comment(" The instance field variable initializers of a class");
     Log.Comment(" correspond to a sequence of assignments that are ");
     Log.Comment(" executed immediately upon entry to one of the instance");
     Log.Comment(" constructors of the class.");
     if (FieldsTestClass46.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }
コード例 #3
0
            public static bool testMethod()
            {
                FieldsTestClass46 test1 = new FieldsTestClass46();
                FieldsTestClass46 test2 = new FieldsTestClass46(0);

                if ((test1.intJ == 2) && (test2.intK == 2))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
コード例 #4
0
 public static bool testMethod()
 {
     FieldsTestClass46 test1 = new FieldsTestClass46();
     FieldsTestClass46 test2 = new FieldsTestClass46(0);
     if ((test1.intJ == 2) && (test2.intK == 2))
     {
         return true;
     }
     else
     {
         return false;
     }
 }