MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / GetRuntimeExtensionRegistry

Function GetRuntimeExtensionRegistry

env/internal/runtime_ext_registry_test.cc:59–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59RuntimeExtensionRegistry 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
80class RuntimeExtensionRegistryTest : public testing::Test {
81 protected:

Callers 1

RunMethod · 0.85

Calls 1

Tested by

no test coverage detected