(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestCompileError(t *testing.T) { |
| 50 | for _, tst := range policyErrorTests { |
| 51 | policy := parsePolicy(t, tst.name, []ParserOption{}) |
| 52 | _, _, iss := compile(t, tst.name, policy, []cel.EnvOption{}, tst.compilerOpts) |
| 53 | if iss.Err() == nil { |
| 54 | t.Fatalf("compile(%s) did not error, wanted %s", tst.name, tst.err) |
| 55 | } |
| 56 | if iss.Err().Error() != tst.err { |
| 57 | t.Errorf("compile(%s) got error %s, wanted %s", tst.name, iss.Err().Error(), tst.err) |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | func TestCompiledRuleHasOptionalOutput(t *testing.T) { |
| 63 | env, err := cel.NewEnv() |
nothing calls this directly
no test coverage detected