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

Function TestIssue830

test/issues/830/issue_test.go:11–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestIssue830(t *testing.T) {
12 program, err := expr.Compile("varNotExist", expr.AllowUndefinedVariables(), expr.AsBool())
13 require.NoError(t, err)
14
15 output, err := expr.Run(program, map[string]interface{}{})
16 require.NoError(t, err)
17
18 // The user expects output to be false (bool), but gets nil.
19 assert.Equal(t, false, output)
20}

Callers

nothing calls this directly

Calls 6

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