(t *testing.T)
| 4318 | } |
| 4319 | |
| 4320 | func TestJSONFieldNamesInvalidProvider(t *testing.T) { |
| 4321 | type wrapperRegistry struct { |
| 4322 | *types.Registry |
| 4323 | } |
| 4324 | reg, err := types.NewRegistry(types.JSONFieldNames(true)) |
| 4325 | if err != nil { |
| 4326 | t.Fatalf("types.NewRegistry() failed: %v", err) |
| 4327 | } |
| 4328 | wrapped := wrapperRegistry{Registry: reg} |
| 4329 | _, err = NewEnv(CustomTypeProvider(wrapped), CustomTypeAdapter(reg), JSONFieldNames(true)) |
| 4330 | if err == nil { |
| 4331 | t.Error("NewEnv() created a CEL environment successfully despite incompatible configs") |
| 4332 | } |
| 4333 | } |
| 4334 | |
| 4335 | // TODO: ideally testCostEstimator and testRuntimeCostEstimator would be shared in a test fixtures package |
| 4336 | type testCostEstimator struct { |
nothing calls this directly
no test coverage detected