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

Function TestIssue723

test/issues/723/issue_test.go:10–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestIssue723(t *testing.T) {
11 emptyMap := make(map[string]string)
12 env := map[string]interface{}{
13 "empty_map": emptyMap,
14 }
15
16 code := `get(empty_map, "non_existing_key")`
17
18 program, err := expr.Compile(code, expr.Env(env))
19 require.NoError(t, err)
20
21 output, err := expr.Run(program, env)
22 require.NoError(t, err)
23 require.Equal(t, nil, output)
24}

Callers

nothing calls this directly

Calls 5

CompileFunction · 0.92
EnvStruct · 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…