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

Method TestFunctionsWithParams

eval/public/builtin_func_test.cc:241–252  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

239
240 // Helper method. Looks up in registry and tests functions with params.
241 void TestFunctionsWithParams(absl::string_view operation, const CelValue& ref,
242 const std::vector<CelValue>& params,
243 int64_t result) {
244 CelValue result_value;
245
246 ASSERT_NO_FATAL_FAILURE(
247 PerformRun(operation, {ref}, {params}, &result_value));
248
249 ASSERT_EQ(result_value.IsInt64(), true);
250 ASSERT_EQ(result_value.Int64OrDie(), result)
251 << operation << " for " << CelValue::TypeName(ref.type());
252 }
253
254 // Helper method to test && and || operations
255 void TestLogicalOperation(absl::string_view operation, bool v1, bool v2,

Callers

nothing calls this directly

Calls 3

IsInt64Method · 0.80
Int64OrDieMethod · 0.80
typeMethod · 0.80

Tested by

no test coverage detected