| 821 | |
| 822 | template <typename Decimal, typename Real> |
| 823 | void CheckDecimalFromRealIntegerString(Real real, int32_t precision, int32_t scale, |
| 824 | const std::string& expected) { |
| 825 | ASSERT_OK_AND_ASSIGN(auto dec, Decimal::FromReal(real, precision, scale)); |
| 826 | EXPECT_EQ(dec.ToIntegerString(), expected); |
| 827 | const std::string expected_neg = (dec) ? "-" + expected : expected; |
| 828 | ASSERT_OK_AND_ASSIGN(dec, Decimal::FromReal(-real, precision, scale)); |
| 829 | EXPECT_EQ(dec.ToIntegerString(), expected_neg); |
| 830 | } |
| 831 | |
| 832 | template <typename Real> |
| 833 | struct FromRealTestParam { |
nothing calls this directly
no test coverage detected