| 57 | } |
| 58 | |
| 59 | RuntimeExtensionRegistry GetRuntimeExtensionRegistry() { |
| 60 | RuntimeExtensionRegistry registry; |
| 61 | registry.AddFunctionRegistration( |
| 62 | "hello_extension", "hello_extension_alias", 1, |
| 63 | [](RuntimeBuilder& runtime_builder, |
| 64 | const RuntimeOptions& runtime_options) -> absl::Status { |
| 65 | return cel::UnaryFunctionAdapter<Value, StringValue>:: |
| 66 | RegisterGlobalOverload("hello", &Hello1, |
| 67 | runtime_builder.function_registry()); |
| 68 | }); |
| 69 | registry.AddFunctionRegistration( |
| 70 | "hello_extension", "hello_extension_alias", 2, |
| 71 | [](RuntimeBuilder& runtime_builder, |
| 72 | const RuntimeOptions& runtime_options) -> absl::Status { |
| 73 | return cel::UnaryFunctionAdapter<Value, StringValue>:: |
| 74 | RegisterMemberOverload("hello", &Hello2, |
| 75 | runtime_builder.function_registry()); |
| 76 | }); |
| 77 | return registry; |
| 78 | } |
| 79 | |
| 80 | class RuntimeExtensionRegistryTest : public testing::Test { |
| 81 | protected: |
no test coverage detected