| 219 | } |
| 220 | |
| 221 | void PerformBetweenToDStrTest(Arena* arena, |
| 222 | const google::protobuf::Message* time_of_day, |
| 223 | std::string* start, std::string* stop, |
| 224 | CelValue* result) { |
| 225 | auto functions = registry_.FindOverloads( |
| 226 | "between", true, |
| 227 | {CelValue::Type::kMessage, CelValue::Type::kString, |
| 228 | CelValue::Type::kString}); |
| 229 | ASSERT_EQ(functions.size(), 1); |
| 230 | |
| 231 | auto func = functions[0]; |
| 232 | |
| 233 | std::vector<CelValue> args = { |
| 234 | CelProtoWrapper::CreateMessage(time_of_day, arena), |
| 235 | CelValue::CreateString(start), CelValue::CreateString(stop)}; |
| 236 | absl::Span<CelValue> arg_span(&args[0], args.size()); |
| 237 | auto status = func->Evaluate(arg_span, result, arena); |
| 238 | |
| 239 | ASSERT_OK(status); |
| 240 | } |
| 241 | |
| 242 | // Helper method to test duration() function |
| 243 | void PerformDurationConversion(Arena* arena, const std::string& ts_str, |
nothing calls this directly
no test coverage detected