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

Function RunShadowableExpression

eval/eval/shadowable_value_step_test.cc:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31using ::testing::Eq;
32
33absl::StatusOr<CelValue> RunShadowableExpression(
34 const absl_nonnull std::shared_ptr<const RuntimeEnv>& env,
35 std::string identifier, cel::Value value, const Activation& activation,
36 Arena* arena) {
37 CEL_ASSIGN_OR_RETURN(
38 auto step,
39 CreateShadowableValueStep(std::move(identifier), std::move(value), 1));
40 ExecutionPath path;
41 path.push_back(std::move(step));
42
43 CelExpressionFlatImpl impl(
44 env, FlatExpression(std::move(path), /*comprehension_slot_count=*/0,
45 env->type_registry.GetComposedTypeProvider(),
46 cel::RuntimeOptions{}));
47 return impl.Evaluate(activation, arena);
48}
49
50TEST(ShadowableValueStepTest, TestEvaluateNoShadowing) {
51 absl_nonnull std::shared_ptr<const RuntimeEnv> env = NewTestingRuntimeEnv();

Callers 1

TESTFunction · 0.85

Calls 2

FlatExpressionClass · 0.85
EvaluateMethod · 0.45

Tested by

no test coverage detected