コード例 #1
0
 public void Const11_Test()
 {
     OutputHelper.WriteLine("Section 10.3");
     OutputHelper.WriteLine("The type specified in a constant declaration");
     OutputHelper.WriteLine("must be byte, char, short, int, long, float,");
     OutputHelper.WriteLine("double, double, bool, string, an enum-type,");
     OutputHelper.WriteLine("or a reference type.  Each constant-expression");
     OutputHelper.WriteLine("must yield a value of the target type or of a ");
     OutputHelper.WriteLine("type that can be converted to the target type");
     OutputHelper.WriteLine("by implicit conversion.");
     //Ported from const11.cs
     Assert.True(ConstTestClass11.test());
 }
コード例 #2
0
ファイル: ConstTests.cs プロジェクト: leeholder/Netduino_SDK
 public MFTestResults Const11_Test()
 {
     Log.Comment("Section 10.3");
     Log.Comment("The type specified in a constant declaration");
     Log.Comment("must be byte, char, short, int, long, float,");
     Log.Comment("double, double, bool, string, an enum-type,");
     Log.Comment("or a reference type.  Each constant-expression");
     Log.Comment("must yield a value of the target type or of a ");
     Log.Comment("type that can be converted to the target type");
     Log.Comment("by implicit conversion.");
     //Ported from const11.cs
     if (ConstTestClass11.test())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }