| 59 | }; |
| 60 | |
| 61 | TEST_F(LazyInitStepTest, CreateCheckInitStepDoesInit) { |
| 62 | ExecutionPath path; |
| 63 | ExecutionPath subpath; |
| 64 | |
| 65 | path.push_back(CreateLazyInitStep(/*slot_index=*/0, |
| 66 | /*subexpression_index=*/1, -1)); |
| 67 | |
| 68 | ASSERT_OK_AND_ASSIGN(subpath.emplace_back(), |
| 69 | CreateConstValueStep(cel::IntValue(42), -1, false)); |
| 70 | |
| 71 | std::vector<ExecutionPathView> expression_table{path, subpath}; |
| 72 | |
| 73 | ExecutionFrame frame(expression_table, activation_, runtime_options_, |
| 74 | evaluator_state_); |
| 75 | ASSERT_OK_AND_ASSIGN(auto value, frame.Evaluate()); |
| 76 | |
| 77 | EXPECT_TRUE(value->Is<IntValue>() && value.GetInt().NativeValue() == 42); |
| 78 | } |
| 79 | |
| 80 | TEST_F(LazyInitStepTest, CreateCheckInitStepSkipInit) { |
| 81 | ExecutionPath path; |
nothing calls this directly
no test coverage detected