| 67 | } |
| 68 | |
| 69 | void TestBoolValue(const char* s, bool exp_val, StringParser::ParseResult exp_result) { |
| 70 | for (int i = 0; i < space_len; ++i) { |
| 71 | for (int j = 0; j < space_len; ++j) { |
| 72 | // All combinations of leading and/or trailing whitespace. |
| 73 | string str = space[i] + s + space[j]; |
| 74 | StringParser::ParseResult result; |
| 75 | bool val = StringParser::StringToBool(str.data(), str.length(), &result); |
| 76 | EXPECT_EQ(exp_val, val) << s; |
| 77 | EXPECT_EQ(result, exp_result); |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | void TestDateValue(const char* s, DateValue exp_val, |
| 83 | StringParser::ParseResult exp_result) { |