@@ -587,6 +587,40 @@ public static IEnumerable<TestCaseData> TestCasesForScriptEvaluateTests
587
587
. SetCategory ( "??=" )
588
588
. Returns ( "First Null-coalescing assignation" ) ;
589
589
590
+ #endregion
591
+
592
+ #region Implicit cast when assign
593
+
594
+ ExpressionEvaluator evaluator0012 = new ExpressionEvaluator ( ) ;
595
+
596
+ yield return new TestCaseData ( "ushort x = 2;" ,
597
+ evaluator0012 ,
598
+ null ,
599
+ new Action ( ( ) => evaluator0012 . Variables [ "x" ] . ShouldBe ( 2 ) ) , null )
600
+ . SetCategory ( "Script" )
601
+ . SetCategory ( "Variable assignation" )
602
+ . SetCategory ( "=" )
603
+ . Returns ( 2 ) ;
604
+
605
+ yield return new TestCaseData ( "double y = 3;" ,
606
+ evaluator0012 ,
607
+ null ,
608
+ new Action ( ( ) => evaluator0012 . Variables [ "y" ] . ShouldBe ( 3 ) ) , null )
609
+ . SetCategory ( "Script" )
610
+ . SetCategory ( "Variable assignation" )
611
+ . SetCategory ( "=" )
612
+ . Returns ( 3 ) ;
613
+
614
+ //yield return new TestCaseData("float z = 3.2;",
615
+ // evaluator0012,
616
+ // null,
617
+ // new Action(() => ((float)evaluator0012.Variables["z"]).ShouldBe(3.2f, 0.001)), null)
618
+ //.SetCategory("Script")
619
+ //.SetCategory("Variable assignation")
620
+ //.SetCategory("=")
621
+ //.Returns();
622
+
623
+
590
624
#endregion
591
625
592
626
#region Array content assignation
@@ -1507,23 +1541,23 @@ public static IEnumerable<TestCaseData> TestCasesForScriptEvaluateTests
1507
1541
. SetCategory ( "new Exception must not throw the exception" )
1508
1542
. Returns ( 3 ) ;
1509
1543
1510
- yield return new TestCaseData ( Resources . Script0072 , null , null , null , null )
1544
+ yield return new TestCaseData ( Resources . Script0102 , null , null , null , null )
1511
1545
. SetCategory ( "Script" )
1512
1546
. SetCategory ( "variable with prefix 'test'" )
1513
1547
. SetCategory ( "new function test" )
1514
1548
. SetCategory ( "Bug" )
1515
1549
. SetCategory ( "#116" )
1516
1550
. Returns ( "hello" ) ;
1517
1551
1518
- yield return new TestCaseData ( Resources . Script0073 , null , null , null , null )
1552
+ yield return new TestCaseData ( Resources . Script0103 , null , null , null , null )
1519
1553
. SetCategory ( "Script" )
1520
1554
. SetCategory ( "variable with prefix 'test'" )
1521
1555
. SetCategory ( "new instance test" )
1522
1556
. SetCategory ( "Bug" )
1523
1557
. SetCategory ( "#116" )
1524
1558
. Returns ( "hello" ) ;
1525
1559
1526
- yield return new TestCaseData ( Resources . Script0074 , null , null , null , null )
1560
+ yield return new TestCaseData ( Resources . Script0104 , null , null , null , null )
1527
1561
. SetCategory ( "Script" )
1528
1562
. SetCategory ( "variable with prefix 'test'" )
1529
1563
. SetCategory ( "Bug" )
0 commit comments