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

Function TestCompiler

tools/celtest/test_runner.go:451–460  ·  view source on GitHub ↗

TestCompiler returns a TestRunnerOption which configures the test runner with a compiler created using the set of compiler options.

(compileOpts ...any)

Source from the content-addressed store, hash-verified

449// TestCompiler returns a TestRunnerOption which configures the test runner with
450// a compiler created using the set of compiler options.
451func TestCompiler(compileOpts ...any) TestRunnerOption {
452 return func(tr *TestRunner) (*TestRunner, error) {
453 c, err := compiler.NewCompiler(compileOpts...)
454 if err != nil {
455 return nil, err
456 }
457 tr.Compiler = c
458 return tr, nil
459 }
460}
461
462// CustomTestCompiler returns a TestRunnerOption which configures the test runner with
463// a custom compiler.

Callers 5

runTestSuiteFunction · 0.92
TestCoverageStatsFunction · 0.85
TestTriggerTestsFunction · 0.85

Calls 1

NewCompilerFunction · 0.92

Tested by

no test coverage detected