| 190 | } |
| 191 | |
| 192 | void TestToString_stringstream(int batch_size) { |
| 193 | for (int i = 0; i < batch_size; ++i) { |
| 194 | int n = date_.size(); |
| 195 | for (int j = 0; j < n; ++j) { |
| 196 | // Old implementation before IMPALA-12111. |
| 197 | stringstream ss; |
| 198 | int year, month, day; |
| 199 | if (date_[j].ToYearMonthDay(&year, &month, &day)) { |
| 200 | ss << std::setfill('0') << setw(4) << year << "-" << setw(2) << month << "-" |
| 201 | << setw(2) << day; |
| 202 | } |
| 203 | to_string_old_result_[j] = ss.str(); |
| 204 | } |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | bool CheckResults() { |
| 209 | DCHECK(to_ymd_result_.size() == cctz_to_ymd_result_.size()); |
no test coverage detected