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

Method TestFunctions

eval/public/builtin_func_test.cc:229–238  ·  view source on GitHub ↗

Helper method. Looks up in registry and tests functions without params.

Source from the content-addressed store, hash-verified

227
228 // Helper method. Looks up in registry and tests functions without params.
229 void TestFunctions(absl::string_view operation, const CelValue& ref,
230 int64_t result) {
231 CelValue result_value;
232
233 ASSERT_NO_FATAL_FAILURE(PerformRun(operation, {ref}, {}, &result_value));
234
235 ASSERT_EQ(result_value.IsInt64(), true);
236 ASSERT_EQ(result_value.Int64OrDie(), result)
237 << operation << " for " << CelValue::TypeName(ref.type());
238 }
239
240 // Helper method. Looks up in registry and tests functions with params.
241 void TestFunctionsWithParams(absl::string_view operation, const CelValue& ref,

Callers

nothing calls this directly

Calls 3

IsInt64Method · 0.80
Int64OrDieMethod · 0.80
typeMethod · 0.80

Tested by

no test coverage detected