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

Function EnableCoverage

tools/celtest/test_runner.go:545–551  ·  view source on GitHub ↗

EnableCoverage returns a TestRunnerOption which enables coverage calculation for the test run.

()

Source from the content-addressed store, hash-verified

543
544// EnableCoverage returns a TestRunnerOption which enables coverage calculation for the test run.
545func EnableCoverage() TestRunnerOption {
546 return func(tr *TestRunner) (*TestRunner, error) {
547 tr.EnableCoverage = true
548 tr.testProgramOptions = append(tr.testProgramOptions, cel.EvalOptions(cel.OptTrackState))
549 return tr, nil
550 }
551}
552
553// Program represents the result of creating CEL programs for the configured expressions in the
554// test runner. It encompasses the following:

Callers 2

TestCoverageStatsFunction · 0.85

Calls 1

EvalOptionsFunction · 0.92

Tested by 2

TestCoverageStatsFunction · 0.68