| 166 | } |
| 167 | |
| 168 | void PerformGetTimeOfDayTest(Arena* arena, absl::Time time_stamp, |
| 169 | std::string* time_zone, CelValue* result) { |
| 170 | auto functions = registry_.FindOverloads( |
| 171 | "timeOfDay", true, |
| 172 | {CelValue::Type::kTimestamp, CelValue::Type::kString}); |
| 173 | ASSERT_EQ(functions.size(), 1); |
| 174 | |
| 175 | auto func = functions[0]; |
| 176 | |
| 177 | std::vector<CelValue> args = {CelValue::CreateTimestamp(time_stamp), |
| 178 | CelValue::CreateString(time_zone)}; |
| 179 | absl::Span<CelValue> arg_span(&args[0], args.size()); |
| 180 | auto status = func->Evaluate(arg_span, result, arena); |
| 181 | |
| 182 | ASSERT_OK(status); |
| 183 | } |
| 184 | |
| 185 | void PerformGetTimeOfDayUTCTest(Arena* arena, absl::Time time_stamp, |
| 186 | CelValue* result) { |
nothing calls this directly
no test coverage detected