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

Function TEST

runtime/function_registry_test.cc:58–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56};
57
58TEST(FunctionRegistryTest, InsertAndRetrieveLazyFunction) {
59 cel::FunctionDescriptor lazy_function_desc{"LazyFunction", false, {}};
60 FunctionRegistry registry;
61 Activation activation;
62 ASSERT_OK(registry.RegisterLazyFunction(lazy_function_desc));
63
64 const auto descriptors =
65 registry.FindLazyOverloads("LazyFunction", false, {});
66 EXPECT_THAT(descriptors, SizeIs(1));
67}
68
69// Confirm that lazy and static functions share the same descriptor space:
70// i.e. you can't insert both a lazy function and a static function for the same

Callers

nothing calls this directly

Calls 12

FunctionDescriptorClass · 0.85
ASSERT_OK_AND_ASSIGNFunction · 0.50
RegisterLazyFunctionMethod · 0.45
FindLazyOverloadsMethod · 0.45
RegisterMethod · 0.45
okMethod · 0.45
FindStaticOverloadsMethod · 0.45
nameMethod · 0.45
ListFunctionsMethod · 0.45
GetFunctionMethod · 0.45
InsertFunctionMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected