(t *testing.T)
| 4376 | } |
| 4377 | |
| 4378 | func TestJSONFieldNamesInvalidProvider(t *testing.T) { |
| 4379 | type wrapperRegistry struct { |
| 4380 | *types.Registry |
| 4381 | } |
| 4382 | reg, err := types.NewRegistry(types.JSONFieldNames(true)) |
| 4383 | if err != nil { |
| 4384 | t.Fatalf("types.NewRegistry() failed: %v", err) |
| 4385 | } |
| 4386 | wrapped := wrapperRegistry{Registry: reg} |
| 4387 | _, err = NewEnv(CustomTypeProvider(wrapped), CustomTypeAdapter(reg), JSONFieldNames(true)) |
| 4388 | if err == nil { |
| 4389 | t.Error("NewEnv() created a CEL environment successfully despite incompatible configs") |
| 4390 | } |
| 4391 | } |
| 4392 | |
| 4393 | // TODO: ideally testCostEstimator and testRuntimeCostEstimator would be shared in a test fixtures package |
| 4394 | type testCostEstimator struct { |
nothing calls this directly
no test coverage detected