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

Function MakeTestFunctionStep

eval/eval/function_step_test.cc:228–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228absl::StatusOr<std::unique_ptr<ExpressionStep>> MakeTestFunctionStep(
229 const CallExpr& call, const CelFunctionRegistry& registry) {
230 auto argument_matcher = ArgumentMatcher(call);
231 auto lazy_overloads = registry.ModernFindLazyOverloads(
232 call.function(), call.has_target(), argument_matcher);
233 if (!lazy_overloads.empty()) {
234 return CreateFunctionStep(call, GetExprId(), lazy_overloads);
235 }
236 auto overloads = registry.FindStaticOverloads(
237 call.function(), call.has_target(), argument_matcher);
238 return CreateFunctionStep(call, GetExprId(), overloads);
239}
240
241// Test common functions with varying levels of unknown support.
242class FunctionStepTest

Callers 1

TESTFunction · 0.85

Calls 7

ArgumentMatcherFunction · 0.85
CreateFunctionStepFunction · 0.85
GetExprIdFunction · 0.85
has_targetMethod · 0.80
emptyMethod · 0.45
FindStaticOverloadsMethod · 0.45

Tested by

no test coverage detected