コード例 #1
0
 public void Fields23_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(FieldsTestClass23.testMethod());
 }
コード例 #2
0
            public static bool testMethod()
            {
                FieldsTestClass23 MC = new FieldsTestClass23();

                if ((MC.intI == 2) && (MC.strS.Equals("MyString")) && (MC.enuE == FieldsTestClass23_Enum.a) && (MC.sctS.Test == 3) && (MC.clsC.Test == 4))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
コード例 #3
0
ファイル: FieldsTests.cs プロジェクト: leeholder/Netduino_SDK
 public MFTestResults Fields23_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 (FieldsTestClass23.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }
コード例 #4
0
            public static bool testMethod()
            {

                FieldsTestClass23 MC = new FieldsTestClass23();

                if ((MC.intI == 2) && (MC.strS.Equals("MyString")) && (MC.enuE == FieldsTestClass23_Enum.a) && (MC.sctS.Test == 3) && (MC.clsC.Test == 4))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }