| 49 | |
| 50 | template <typename T> |
| 51 | void VerifyParse(const string& s, int precision, int scale, bool round, |
| 52 | const DecimalValue<T>& expected_val, StringParser::ParseResult expected_result) { |
| 53 | StringParser::ParseResult parse_result; |
| 54 | DecimalValue<T> val = StringParser::StringToDecimal<T>( |
| 55 | s.c_str(), s.size(), precision, scale, round, &parse_result); |
| 56 | EXPECT_EQ(expected_result, parse_result) << "Failed test string: " << s; |
| 57 | if (expected_result == StringParser::PARSE_SUCCESS || |
| 58 | expected_result == StringParser::PARSE_UNDERFLOW) { |
| 59 | VerifyEquals(expected_val, val); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | template <typename T> |
| 64 | void VerifyParse(const string& s, int precision, int scale, |
no test coverage detected