(t *testing.T)
| 17 | NewCompiler().Compiler(script) |
| 18 | } |
| 19 | func TestCompiler_Compiler2(t *testing.T) { |
| 20 | script := ` |
| 21 | int a=10; |
| 22 | a++; |
| 23 | return a; |
| 24 | ` |
| 25 | compiler := NewCompiler().Compiler(script) |
| 26 | object := compiler.(*ReturnObject) |
| 27 | fmt.Println(object.GetReturnObject()) |
| 28 | assert.Equal(t, object.GetReturnObject(), 11) |
| 29 | } |
| 30 | func TestCompiler_CompilerFor(t *testing.T) { |
| 31 | script := ` |
| 32 | int age = 0 ; |
nothing calls this directly
no test coverage detected