| 80 | } |
| 81 | |
| 82 | void TestDateValue(const char* s, DateValue exp_val, |
| 83 | StringParser::ParseResult exp_result) { |
| 84 | for (int i = 0; i < space_len; ++i) { |
| 85 | for (int j = 0; j < space_len; ++j) { |
| 86 | // All combinations of leading and/or trailing whitespace. |
| 87 | string str = space[i] + s + space[j]; |
| 88 | StringParser::ParseResult result; |
| 89 | DateValue val = StringParser::StringToDate(str.data(), str.length(), &result); |
| 90 | EXPECT_EQ(exp_val, val) << s; |
| 91 | EXPECT_EQ(result, exp_result); |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // Compare Impala's float conversion function against strtod. |
| 97 | template<typename T> |