MCPcopy Create free account
hub / github.com/crossoverJie/gscript / TestCompiler_CompilerIf2

Function TestCompiler_CompilerIf2

compiler_test.go:88–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86 assert.Equal(t, object.GetReturnObject(), 9)
87}
88func TestCompiler_CompilerIf2(t *testing.T) {
89 script := `
90int age=10;
91if (age>10){
92 age++;
93}else{
94 age--;
95}
96return abc;
97`
98 compiler := NewCompiler().Compiler(script)
99 assert.Nil(t, compiler)
100}
101
102func TestCompiler_FunctionCall(t *testing.T) {
103 script := `

Callers

nothing calls this directly

Calls 3

NewCompilerFunction · 0.85
CompilerMethod · 0.80
NilMethod · 0.80

Tested by

no test coverage detected