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

Function TestIssue730_eval

test/issues/730/issue_test.go:45–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestIssue730_eval(t *testing.T) {
46 code := `Mode == 1`
47
48 tmp := ModeEnumA
49
50 env := map[string]any{
51 "Mode": &tmp,
52 }
53
54 // Golang also does not allow this:
55 // _ = ModeEnumA == int(1) // will not compile
56
57 out, err := expr.Eval(code, env)
58 require.NoError(t, err)
59 require.False(t, out.(bool))
60}

Callers

nothing calls this directly

Calls 3

EvalFunction · 0.92
NoErrorFunction · 0.92
FalseFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…