Builder with google.api.expr.runtime.TestMessage and TestEnum types linked in and the standard functions registered.
| 1504 | // Builder with google.api.expr.runtime.TestMessage and TestEnum types |
| 1505 | // linked in and the standard functions registered. |
| 1506 | CelExpressionBuilderFlatImpl BuilderForNameResolutionTest( |
| 1507 | absl::string_view container) { |
| 1508 | cel::RuntimeOptions options; |
| 1509 | options.enable_qualified_type_identifiers = true; |
| 1510 | |
| 1511 | CelExpressionBuilderFlatImpl builder(NewTestingRuntimeEnv(), options); |
| 1512 | builder.GetTypeRegistry()->Register(TestMessage::TestEnum_descriptor()); |
| 1513 | builder.GetTypeRegistry()->Register(TestEnum_descriptor()); |
| 1514 | builder.set_container(std::string(container)); |
| 1515 | ABSL_CHECK_OK(cel::RegisterStandardFunctions( |
| 1516 | builder.GetRegistry()->InternalGetRegistry(), options)); |
| 1517 | return builder; |
| 1518 | } |
| 1519 | |
| 1520 | TEST(FlatExprBuilderTest, ShortEnumResolution) { |
| 1521 | google::protobuf::Arena arena; |
no test coverage detected