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

Function TestExamples

test/examples/examples_test.go:21–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestExamples(t *testing.T) {
22 for _, code := range examples {
23 code := code
24 t.Run(code.Title, func(t *testing.T) {
25 program, err := expr.Compile(code.Content, expr.Env(nil))
26 require.NoError(t, err)
27
28 _, err = expr.Run(program, nil)
29 require.NoError(t, err)
30 })
31 }
32}

Callers

nothing calls this directly

Calls 5

CompileFunction · 0.92
EnvStruct · 0.92
NoErrorFunction · 0.92
RunFunction · 0.92
RunMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…