File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
tests/HydraScript.UnitTests/Domain/BackEnd Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ using HydraScript . Domain . BackEnd ;
2+ using HydraScript . Domain . BackEnd . Impl ;
3+ using HydraScript . Domain . BackEnd . Impl . Instructions . WithAssignment ;
4+ using HydraScript . Domain . BackEnd . Impl . Values ;
5+
6+ namespace HydraScript . UnitTests . Domain . BackEnd ;
7+
8+ public class AsStringTests
9+ {
10+ [ Theory , AutoHydraScriptData ]
11+ public void Execute_String_NoQuotes ( VirtualMachine vm )
12+ {
13+ // Arrange
14+ AddressedInstructions program = [ new AsString ( new Constant ( "string" ) ) ] ;
15+ vm . ExecuteParams . Frames . Push ( new Frame ( program . Start ) ) ;
16+
17+ // Act
18+ program [ program . Start ] . Execute ( vm . ExecuteParams ) ;
19+
20+ // Assert
21+ var frame = vm . ExecuteParams . Frames . Peek ( ) ;
22+ frame [ program . Start . Name ] . Should ( ) . Be ( "string" ) ;
23+ frame [ program . Start . Name ] . Should ( ) . NotBe ( "\" string\" " ) ;
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments