public void Const18_Test()
 {
     //Ported from const18.cs
     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.");
     Assert.True(ConstTestClass18.test());
 }
Ejemplo n.º 2
0
 public MFTestResults Const18_Test()
 {
     //Ported from const18.cs
     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.");
     if (ConstTestClass18.test())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }