| 58 | } |
| 59 | |
| 60 | void test_invalid_conversion(const std::string& text, const std::string& expected_remaining = "") |
| 61 | { |
| 62 | std::istringstream ss(text); |
| 63 | ss.imbue(m_locale); |
| 64 | |
| 65 | fpm::fixed_16_16 value; |
| 66 | ss >> value; |
| 67 | |
| 68 | // Stream should have a parse error |
| 69 | EXPECT_TRUE(ss.fail()) << "for text: \"" << text << "\"";; |
| 70 | EXPECT_FALSE(ss.bad()) << "for text: \"" << text << "\"";; |
| 71 | EXPECT_FALSE(ss.good()) << "for text: \"" << text << "\"";; |
| 72 | |
| 73 | EXPECT_EQ(get_remainder(ss), expected_remaining) << "for text: \"" << text << "\""; |
| 74 | } |
| 75 | |
| 76 | private: |
| 77 | static std::string get_remainder(std::istream& is) |
nothing calls this directly
no outgoing calls
no test coverage detected