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

Function TestExpr_optional_chaining_property

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

Source from the content-addressed store, hash-verified

1516}
1517
1518func TestExpr_optional_chaining_property(t *testing.T) {
1519 env := map[string]any{
1520 "foo": map[string]any{},
1521 }
1522 program, err := expr.Compile("foo.bar?.baz", expr.Env(env))
1523 require.NoError(t, err)
1524
1525 got, err := expr.Run(program, env)
1526 require.NoError(t, err)
1527 assert.Equal(t, nil, got)
1528}
1529
1530func TestExpr_optional_chaining_nested_chains(t *testing.T) {
1531 env := map[string]any{

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…