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

Function TEST

eval/public/cel_function_registry_test.cc:46–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44};
45
46TEST(CelFunctionRegistryTest, InsertAndRetrieveLazyFunction) {
47 CelFunctionDescriptor lazy_function_desc{"LazyFunction", false, {}};
48 CelFunctionRegistry registry;
49 Activation activation;
50 ASSERT_OK(registry.RegisterLazyFunction(lazy_function_desc));
51
52 const auto descriptors =
53 registry.FindLazyOverloads("LazyFunction", false, {});
54 EXPECT_THAT(descriptors, testing::SizeIs(1));
55}
56
57// Confirm that lazy and static functions share the same descriptor space:
58// i.e. you can't insert both a lazy function and a static function for the same

Callers

nothing calls this directly

Calls 12

messageMethod · 0.80
RegisterLazyFunctionMethod · 0.45
FindLazyOverloadsMethod · 0.45
RegisterMethod · 0.45
okMethod · 0.45
FindStaticOverloadsMethod · 0.45
nameMethod · 0.45
ListFunctionsMethod · 0.45
InsertFunctionMethod · 0.45
has_valueMethod · 0.45
GetFunctionMethod · 0.45

Tested by

no test coverage detected