MCPcopy
hub / github.com/expr-lang/expr / TestRun_ReuseVM

Function TestRun_ReuseVM

vm/vm_test.go:27–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25}
26
27func TestRun_ReuseVM(t *testing.T) {
28 node, err := parser.Parse(`map(1..2, {#})`)
29 require.NoError(t, err)
30
31 program, err := compiler.Compile(node, nil)
32 require.NoError(t, err)
33
34 reuse := vm.VM{}
35 _, err = reuse.Run(program, nil)
36 require.NoError(t, err)
37 _, err = reuse.Run(program, nil)
38 require.NoError(t, err)
39}
40
41func TestRun_ReuseVM_for_different_variables(t *testing.T) {
42 v := vm.VM{}

Callers

nothing calls this directly

Calls 4

RunMethod · 0.95
ParseFunction · 0.92
NoErrorFunction · 0.92
CompileFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…