MCPcopy Create free account
hub / github.com/cel-expr/cel-go / testRunnerCompilerFromFlags

Function testRunnerCompilerFromFlags

tools/celtest/test_runner.go:213–229  ·  view source on GitHub ↗
(testCompilerOpts ...any)

Source from the content-addressed store, hash-verified

211}
212
213func testRunnerCompilerFromFlags(testCompilerOpts ...any) TestRunnerOption {
214 var opts []any
215 if fileDescriptorSetPath != "" {
216 opts = append(opts, compiler.TypeDescriptorSetFile(fileDescriptorSetPath))
217 }
218 if baseConfigPath != "" {
219 opts = append(opts, compiler.EnvironmentFile(baseConfigPath))
220 }
221 if configPath != "" {
222 opts = append(opts, compiler.EnvironmentFile(configPath))
223 }
224 if enableCoverage {
225 opts = append(opts, cel.EnableMacroCallTracking())
226 }
227 opts = append(opts, testCompilerOpts...)
228 return TestCompiler(opts...)
229}
230
231// ActivationFactory is a function which creates a CEL activation from the provided variables.
232type ActivationFactory func(vars any) (cel.Activation, error)

Callers 1

Calls 4

TypeDescriptorSetFileFunction · 0.92
EnvironmentFileFunction · 0.92
EnableMacroCallTrackingFunction · 0.92
TestCompilerFunction · 0.85

Tested by 1