Helper method. Looks up in registry and tests functions with params.
| 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, |
nothing calls this directly
no test coverage detected