| 31 | using ::testing::Eq; |
| 32 | |
| 33 | absl::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 | |
| 50 | TEST(ShadowableValueStepTest, TestEvaluateNoShadowing) { |
| 51 | absl_nonnull std::shared_ptr<const RuntimeEnv> env = NewTestingRuntimeEnv(); |
no test coverage detected