File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
SL.Test.Unit.Interpreter/tests Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,17 @@ public async Task ShouldHandleAdd()
113113 . HasVariable ( "x" , 6 ) ;
114114 }
115115
116+ [ Test ]
117+ public async Task ShouldHandleAddVariable ( )
118+ {
119+ var interpreter = await ExecuteProgram ( "var x = 3; var y = x + 3;" ) ;
120+
121+ ProgramAssert . AssertProgram ( interpreter )
122+ . HasVariable ( "x" , 3 )
123+ . HasVariable ( "y" , 6 ) ;
124+ }
125+
126+
116127 [ Test ]
117128 public async Task ShouldHandleMinus ( )
118129 {
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ public class ForeachBlockTests : InterpreterTestBase
66 public async Task ShouldHandleInfitieFor ( )
77 {
88 var interpreter = await ExecuteProgram ( "for(var i in range(2)) { print(i); }" ) ;
9-
10- ProgramAssert . AssertProgram ( interpreter )
11- . HasConsoleOutputCount ( 3 )
12- . HasConsoleOutput ( "0" , 0 )
13- . HasConsoleOutput ( "1" , 1 )
14- . HasConsoleOutput ( "2" , 2 ) ;
9+
10+ ProgramAssert . AssertProgram ( interpreter )
11+ . HasConsoleOutputCount ( 2 )
12+ . HasConsoleOutput ( "0" , 0 )
13+ . HasConsoleOutput ( "1" , 1 ) ;
14+
1515 }
1616}
You can’t perform that action at this time.
0 commit comments