(t *testing.T)
| 4027 | } |
| 4028 | |
| 4029 | func TestJSONFieldNamesInvalidProvider(t *testing.T) { |
| 4030 | type wrapperRegistry struct { |
| 4031 | *types.Registry |
| 4032 | } |
| 4033 | reg, err := types.NewProtoRegistry(types.JSONFieldNames(true)) |
| 4034 | if err != nil { |
| 4035 | t.Fatalf("types.NewProtoRegistry() failed: %v", err) |
| 4036 | } |
| 4037 | wrapped := wrapperRegistry{Registry: reg} |
| 4038 | _, err = NewEnv(CustomTypeProvider(wrapped), CustomTypeAdapter(reg), JSONFieldNames(true)) |
| 4039 | if err == nil { |
| 4040 | t.Error("NewEnv() created a CEL environment successfully despite incompatible configs") |
| 4041 | } |
| 4042 | } |
| 4043 | |
| 4044 | // TODO: ideally testCostEstimator and testRuntimeCostEstimator would be shared in a test fixtures package |
| 4045 | type testCostEstimator struct { |
nothing calls this directly
no test coverage detected