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

Function TestIssue_570

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

Source from the content-addressed store, hash-verified

2675}
2676
2677func TestIssue_570(t *testing.T) {
2678 type Student struct {
2679 Name string
2680 }
2681
2682 env := map[string]any{
2683 "student": (*Student)(nil),
2684 }
2685
2686 program, err := expr.Compile("student?.Name", expr.Env(env))
2687 require.NoError(t, err)
2688
2689 out, err := expr.Run(program, env)
2690 require.NoError(t, err)
2691 require.IsType(t, nil, out)
2692}
2693
2694func TestIssue_integer_truncated_by_compiler(t *testing.T) {
2695 env := map[string]any{

Callers

nothing calls this directly

Calls 5

CompileFunction · 0.92
EnvStruct · 0.92
NoErrorFunction · 0.92
RunFunction · 0.92
IsTypeFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…