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

Function TestExpr_optional_chaining

expr_test.go:1508–1516  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1506}
1507
1508func TestExpr_optional_chaining(t *testing.T) {
1509 env := map[string]any{}
1510 program, err := expr.Compile("foo?.bar.baz", expr.Env(env), expr.AllowUndefinedVariables())
1511 require.NoError(t, err)
1512
1513 got, err := expr.Run(program, env)
1514 require.NoError(t, err)
1515 assert.Equal(t, nil, got)
1516}
1517
1518func TestExpr_optional_chaining_property(t *testing.T) {
1519 env := map[string]any{

Callers

nothing calls this directly

Calls 6

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