@@ -18,35 +18,8 @@ import (
1818)
1919
2020func TestRun_NilProgram (t * testing.T ) {
21- t .Run ("run with nil program" , func (t * testing.T ) {
22- newVM , err := vm .Run (nil , nil )
23- require .Error (t , err )
24- require .Nil (t , newVM )
25- })
26- t .Run ("run with nil program and nil config" , func (t * testing.T ) {
27- newVM , err := vm .RunWithConfig (nil , nil , nil )
28- require .Error (t , err )
29- require .Nil (t , newVM )
30- })
31- t .Run ("run with nil config" , func (t * testing.T ) {
32- program , err := expr .Compile ("1" )
33- require .Nil (t , err )
34- newVM , err := vm .RunWithConfig (program , nil , nil )
35- require .Error (t , err )
36- require .Nil (t , newVM )
37- })
38- t .Run ("run with config" , func (t * testing.T ) {
39- program , err := expr .Compile ("1" )
40- require .Nil (t , err )
41- config := conf .New (nil )
42- env := map [string ]any {
43- "a" : 1 ,
44- }
45- config .MemoryBudget = 100
46- newVM , err := vm .RunWithConfig (program , env , config )
47- require .Nil (t , err )
48- require .Equal (t , newVM , 1 )
49- })
21+ _ , err := vm .Run (nil , nil )
22+ require .Error (t , err )
5023}
5124
5225func TestRun_ReuseVM (t * testing.T ) {
0 commit comments