@@ -990,7 +990,31 @@ public void TypeTesting(string expression, Type type)
990990 #region Bugs correction
991991
992992 [ TestCase ( "new DateTime(1985,9,11).ToString(\" dd.MM.yyyy\" )" , ExpectedResult = "11.09.1985" , Category = "Complex expression,Static method,Instance method,Lambda function,Cast" ) ]
993-
993+
994+ [ TestCase ( "(int)3.6" , ExpectedResult = ( int ) 3.6 , Category = "Complex expression,Cast,double to int,#130" ) ]
995+ [ TestCase ( "(int)-3.6" , ExpectedResult = ( int ) - 3.6 , Category = "Complex expression,Cast,double to int,#130" ) ]
996+ [ TestCase ( "(uint)3.6" , ExpectedResult = ( uint ) 3.6 , Category = "Complex expression,Cast,double to uint,#130" ) ]
997+ [ TestCase ( "(long)3.6" , ExpectedResult = ( long ) 3.6 , Category = "Complex expression,Cast,double to long,#130" ) ]
998+ [ TestCase ( "(short)3.6" , ExpectedResult = ( short ) 3.6 , Category = "Complex expression,Cast,double to short,#130" ) ]
999+
1000+ [ TestCase ( "(int)3.6d" , ExpectedResult = ( int ) 3.6d , Category = "Complex expression,Cast,double to int,#130" ) ]
1001+ [ TestCase ( "(int)-3.6d" , ExpectedResult = ( int ) - 3.6d , Category = "Complex expression,Cast,double to int,#130" ) ]
1002+ [ TestCase ( "(uint)3.6d" , ExpectedResult = ( uint ) 3.6d , Category = "Complex expression,Cast,double to uint,#130" ) ]
1003+ [ TestCase ( "(long)3.6d" , ExpectedResult = ( long ) 3.6d , Category = "Complex expression,Cast,double to long,#130" ) ]
1004+ [ TestCase ( "(short)3.6d" , ExpectedResult = ( short ) 3.6d , Category = "Complex expression,Cast,double to short,#130" ) ]
1005+
1006+ [ TestCase ( "(int)3.6f" , ExpectedResult = ( int ) 3.6f , Category = "Complex expression,Cast,float to int,#130" ) ]
1007+ [ TestCase ( "(int)-3.6f" , ExpectedResult = ( int ) - 3.6f , Category = "Complex expression,Cast,float to int,#130" ) ]
1008+ [ TestCase ( "(uint)3.6f" , ExpectedResult = ( uint ) 3.6f , Category = "Complex expression,Cast,float to uint,#130" ) ]
1009+ [ TestCase ( "(long)3.6f" , ExpectedResult = ( long ) 3.6f , Category = "Complex expression,Cast,float to long,#130" ) ]
1010+ [ TestCase ( "(short)3.6f" , ExpectedResult = ( short ) 3.6f , Category = "Complex expression,Cast,float to short,#130" ) ]
1011+
1012+ [ TestCase ( "(int)3.6m" , ExpectedResult = ( int ) 3.6m , Category = "Complex expression,Cast,decimal to int,#130" ) ]
1013+ [ TestCase ( "(int)-3.6m" , ExpectedResult = ( int ) - 3.6m , Category = "Complex expression,Cast,decimal to int,#130" ) ]
1014+ [ TestCase ( "(uint)3.6m" , ExpectedResult = ( uint ) 3.6m , Category = "Complex expression,Cast,decimal to uint,#130" ) ]
1015+ [ TestCase ( "(long)3.6m" , ExpectedResult = ( long ) 3.6m , Category = "Complex expression,Cast,decimal to long,#130" ) ]
1016+ [ TestCase ( "(short)3.6m" , ExpectedResult = ( short ) 3.6m , Category = "Complex expression,Cast,decimal to short,#130" ) ]
1017+
9941018 #endregion
9951019
9961020 #endregion
@@ -1592,7 +1616,7 @@ public void ExceptionThrowingEvaluation(ExpressionEvaluator evaluator, string ex
15921616 #region Bug corrections
15931617
15941618 /// <summary>
1595- /// To correct #127 Evaluating "new DateTime(2022,1,20)" does not work
1619+ /// To correct #127 Evaluating "new DateTime(2022,1,20)" does not work
15961620 /// unless OptionInlineNamespacesEvaluationActive is turned on
15971621 /// </summary>
15981622 [ Test ]
@@ -1615,7 +1639,7 @@ public void Evaluate_NewDateTime_When_OptionInlineNamespacesEvaluationActive_is_
16151639 }
16161640
16171641 /// <summary>
1618- /// To correct #127 Evaluating "new DateTime(2022,1,20)" does not work
1642+ /// To correct #127 Evaluating "new DateTime(2022,1,20)" does not work
16191643 /// unless OptionInlineNamespacesEvaluationActive is turned on
16201644 /// </summary>
16211645 [ Test ]
@@ -1637,7 +1661,6 @@ public void Evaluate_NewDateTime_When_OptionInlineNamespacesEvaluationActive_is_
16371661 dateTime . Value . Day . ShouldBe ( 20 ) ;
16381662 }
16391663
1640-
16411664 /// <summary>
16421665 /// To correct #81 Exception is assigned to variable
16431666 /// With simple variable
0 commit comments