| 60 | |
| 61 | template <typename DecimalType> |
| 62 | void AssertDecimalFromString(const std::string& s, const DecimalType& expected, |
| 63 | int32_t expected_precision, int32_t expected_scale) { |
| 64 | ARROW_SCOPED_TRACE("s = '", s, "'"); |
| 65 | DecimalType d; |
| 66 | int32_t precision, scale; |
| 67 | ASSERT_OK(DecimalType::FromString(s, &d, &precision, &scale)); |
| 68 | EXPECT_EQ(expected, d); |
| 69 | EXPECT_EQ(expected_precision, precision); |
| 70 | EXPECT_EQ(expected_scale, scale); |
| 71 | } |
| 72 | |
| 73 | // Assert that the low bits of an array of integers are equal to `expected_low`, |
| 74 | // and that all other bits are equal to `expected_high`. |
no test coverage detected