| 63 | }; |
| 64 | |
| 65 | TEST(EvaluatorCoreTest, ExecutionFrameNext) { |
| 66 | ExecutionPath path; |
| 67 | google::protobuf::Arena arena; |
| 68 | cel::runtime_internal::RuntimeTypeProvider type_provider( |
| 69 | cel::internal::GetTestingDescriptorPool()); |
| 70 | auto const_step = std::make_unique<const FakeConstExpressionStep>(); |
| 71 | auto incr_step1 = std::make_unique<const FakeIncrementExpressionStep>(); |
| 72 | auto incr_step2 = std::make_unique<const FakeIncrementExpressionStep>(); |
| 73 | |
| 74 | path.push_back(std::move(const_step)); |
| 75 | path.push_back(std::move(incr_step1)); |
| 76 | path.push_back(std::move(incr_step2)); |
| 77 | |
| 78 | auto dummy_expr = std::make_unique<Expr>(); |
| 79 | |
| 80 | cel::RuntimeOptions options; |
| 81 | options.unknown_processing = cel::UnknownProcessingOptions::kDisabled; |
| 82 | cel::Activation activation; |
| 83 | FlatExpressionEvaluatorState state( |
| 84 | path.size(), |
| 85 | /*comprehension_slots_size=*/0, type_provider, |
| 86 | cel::internal::GetTestingDescriptorPool(), |
| 87 | cel::internal::GetTestingMessageFactory(), &arena); |
| 88 | ExecutionFrame frame(path, activation, options, state); |
| 89 | |
| 90 | EXPECT_THAT(frame.Next(), Eq(path[0].get())); |
| 91 | EXPECT_THAT(frame.Next(), Eq(path[1].get())); |
| 92 | EXPECT_THAT(frame.Next(), Eq(path[2].get())); |
| 93 | EXPECT_THAT(frame.Next(), Eq(nullptr)); |
| 94 | } |
| 95 | |
| 96 | TEST(EvaluatorCoreTest, SimpleEvaluatorTest) { |
| 97 | ExecutionPath path; |
nothing calls this directly
no test coverage detected