MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / StdLibCompiler

Function StdLibCompiler

validator/regex_validator_test.cc:35–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33using ::testing::HasSubstr;
34
35absl::StatusOr<std::unique_ptr<Compiler>> StdLibCompiler() {
36 CEL_ASSIGN_OR_RETURN(
37 auto builder,
38 NewCompilerBuilder(internal::GetSharedTestingDescriptorPool()));
39 builder->AddLibrary(StandardCompilerLibrary()).IgnoreError();
40 CEL_RETURN_IF_ERROR(builder->GetCheckerBuilder().AddVariable(
41 MakeVariableDecl("p", StringType())));
42 return builder->Build();
43}
44
45struct TestCase {
46 std::string expression;

Callers

nothing calls this directly

Calls 6

StandardCompilerLibraryFunction · 0.85
MakeVariableDeclFunction · 0.85
AddVariableMethod · 0.80
StringTypeClass · 0.50
AddLibraryMethod · 0.45
BuildMethod · 0.45

Tested by

no test coverage detected