(t *testing.T)
| 93 | } |
| 94 | |
| 95 | func TestCompileError(t *testing.T) { |
| 96 | for _, tst := range policyErrorTests { |
| 97 | policy := parsePolicy(t, tst.name, []ParserOption{}) |
| 98 | _, _, iss := compile(t, tst.name, policy, []cel.EnvOption{}, tst.compilerOpts) |
| 99 | if iss.Err() == nil { |
| 100 | t.Fatalf("compile(%s) did not error, wanted %s", tst.name, tst.err) |
| 101 | } |
| 102 | if iss.Err().Error() != tst.err { |
| 103 | t.Errorf("compile(%s) got error %s, wanted %s", tst.name, iss.Err().Error(), tst.err) |
| 104 | } |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func TestCompiledRuleHasOptionalOutput(t *testing.T) { |
| 109 | env, err := cel.NewEnv() |
nothing calls this directly
no test coverage detected