| 43 | |
| 44 | template <typename B, typename I, unsigned int F> |
| 45 | void test_conversion(const std::string& text, fpm::fixed<B, I, F> expected, const std::string& expected_remaining = "") |
| 46 | { |
| 47 | std::istringstream ss(text); |
| 48 | ss.imbue(m_locale); |
| 49 | |
| 50 | fpm::fixed<B, I, F> value; |
| 51 | ss >> value; |
| 52 | |
| 53 | // Values should match |
| 54 | EXPECT_EQ(value, expected) << "for text: \"" << text << "\""; |
| 55 | EXPECT_TRUE(ss); |
| 56 | |
| 57 | EXPECT_EQ(get_remainder(ss), expected_remaining) << "for text: \"" << text << "\""; |
| 58 | } |
| 59 | |
| 60 | void test_invalid_conversion(const std::string& text, const std::string& expected_remaining = "") |
| 61 | { |
nothing calls this directly
no outgoing calls
no test coverage detected