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

Function TestCustomTestSuiteParser

tools/celtest/test_runner_test.go:213–224  ·  view source on GitHub ↗

TestCustomTestSuiteParser triggers the test runner where the tests are provided by a custom test suite parser configured using TestSuiteParserOption.

(t *testing.T)

Source from the content-addressed store, hash-verified

211// TestCustomTestSuiteParser triggers the test runner where the tests are provided by a custom
212// test suite parser configured using TestSuiteParserOption.
213func TestCustomTestSuiteParser(t *testing.T) {
214 t.Run("test custom test suite parser", func(t *testing.T) {
215 celExpr := "a || i + fn(j) == 42"
216 compilerOpts := []any{compiler.EnvironmentFile("testdata/config.yaml"), fnEnvOption()}
217 testRunnerOpts := []TestRunnerOption{
218 TestCompiler(compilerOpts...),
219 TestExpression(celExpr),
220 TestSuiteParserOption(&tsparser{}),
221 }
222 TriggerTests(t, testRunnerOpts...)
223 })
224}
225
226type tsparser struct {
227 TestSuiteParser

Callers

nothing calls this directly

Calls 6

EnvironmentFileFunction · 0.92
fnEnvOptionFunction · 0.85
TestCompilerFunction · 0.85
TestExpressionFunction · 0.85
TestSuiteParserOptionFunction · 0.85
TriggerTestsFunction · 0.85

Tested by

no test coverage detected