public void Const19_Test() { //Ported from const19.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(ConstTestClass19.test()); }
public MFTestResults Const19_Test() { //Ported from const19.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 (ConstTestClass19.test()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }