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

Function newBenchmarkCategoryParser

parser/parser_test.go:3890–3903  ·  view source on GitHub ↗
(tb testing.TB, options ...Option)

Source from the content-addressed store, hash-verified

3888}
3889
3890func newBenchmarkCategoryParser(tb testing.TB, options ...Option) *Parser {
3891 tb.Helper()
3892 opts := append([]Option{
3893 Macros(append(AllMacros, optMapMacro)...),
3894 EnableOptionalSyntax(true),
3895 EnableIdentEscapeSyntax(true),
3896 MaxRecursionDepth(512),
3897 }, options...)
3898 p, err := NewParser(opts...)
3899 if err != nil {
3900 tb.Fatalf("NewParser() failed: %v", err)
3901 }
3902 return p
3903}
3904
3905func TestParseErrorData(t *testing.T) {
3906 for _, pratt := range []bool{false, true} {

Callers 2

BenchmarkByCategoryFunction · 0.85

Calls 5

EnableOptionalSyntaxFunction · 0.85
EnableIdentEscapeSyntaxFunction · 0.85
MaxRecursionDepthFunction · 0.85
MacrosFunction · 0.70
NewParserFunction · 0.70

Tested by

no test coverage detected