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

Function PartialEvalProgramOption

tools/celtest/test_runner.go:537–542  ·  view source on GitHub ↗

PartialEvalProgramOption returns a TestRunnerOption which enables partial evaluation for the CEL program by setting the OptPartialEval eval option. Note: The test setup uses env.PartialVars() for creating PartialActivation.

()

Source from the content-addressed store, hash-verified

535//
536// Note: The test setup uses env.PartialVars() for creating PartialActivation.
537func PartialEvalProgramOption() TestRunnerOption {
538 return func(tr *TestRunner) (*TestRunner, error) {
539 tr.testProgramOptions = append(tr.testProgramOptions, cel.EvalOptions(cel.OptPartialEval))
540 return tr, nil
541 }
542}
543
544// EnableCoverage returns a TestRunnerOption which enables coverage calculation for the test run.
545func EnableCoverage() TestRunnerOption {

Callers 3

runTestSuiteFunction · 0.92
TestCoverageStatsFunction · 0.85
TestTriggerTestsFunction · 0.85

Calls 1

EvalOptionsFunction · 0.92

Tested by 3

runTestSuiteFunction · 0.74
TestCoverageStatsFunction · 0.68
TestTriggerTestsFunction · 0.68