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

Function TestArithmeticOperators4

visitor_test.go:117–130  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

115 fmt.Println(result)
116}
117func TestArithmeticOperators4(t *testing.T) {
118 expression := `
119if ( (10 +10 ) == 20 ) {
120 return true ;
121} else {
122 return 20 ;
123}
124`
125 var result = NewCompiler().Compiler(expression)
126 fmt.Println(result)
127 object := result.(*ReturnObject)
128 assert.Equal(t, object.GetReturnObject(), true)
129
130}
131func TestArithmeticOperators5(t *testing.T) {
132 expression := `
133if ( (10 +10 ) == 20 ) {

Callers

nothing calls this directly

Calls 3

NewCompilerFunction · 0.85
CompilerMethod · 0.80
GetReturnObjectMethod · 0.80

Tested by

no test coverage detected