MCPcopy Index your code
hub / github.com/expr-lang/expr / TestPatch_length

Function TestPatch_length

test/patch/patch_test.go:27–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25}
26
27func TestPatch_length(t *testing.T) {
28 program, err := expr.Compile(
29 `String.length == 5`,
30 expr.Env(mock.Env{}),
31 expr.Patch(&lengthPatcher{}),
32 )
33 require.NoError(t, err)
34
35 env := mock.Env{String: "hello"}
36 output, err := expr.Run(program, env)
37 require.NoError(t, err)
38 require.Equal(t, true, output)
39}

Callers

nothing calls this directly

Calls 6

CompileFunction · 0.92
EnvStruct · 0.92
PatchFunction · 0.92
NoErrorFunction · 0.92
RunFunction · 0.92
EqualFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…