MCPcopy Create free account
hub / github.com/expr-lang/expr / TestCompile_OpCallFast

Function TestCompile_OpCallFast

compiler/compiler_test.go:454–460  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

452}
453
454func TestCompile_OpCallFast(t *testing.T) {
455 env := mock.Env{}
456 program, err := expr.Compile("Fast(3, 2, 1)", expr.Env(env))
457 require.NoError(t, err)
458 require.Equal(t, vm.OpCallFast, program.Bytecode[4])
459 require.Equal(t, 3, program.Arguments[4])
460}
461
462func TestCompile_optimizes_jumps(t *testing.T) {
463 env := map[string]any{

Callers

nothing calls this directly

Calls 4

CompileFunction · 0.92
EnvStruct · 0.92
NoErrorFunction · 0.92
EqualFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…