| 662 | |
| 663 | template <typename ArrowType> |
| 664 | void TestNumericLimit() { |
| 665 | using c_type = typename ArrowType::c_type; |
| 666 | ASSERT_OK_AND_ASSIGN(int32_t precision, |
| 667 | MaxDecimalDigitsForInteger(ArrowType::type_id)); |
| 668 | |
| 669 | DecimalType min_value(std::numeric_limits<c_type>::min()); |
| 670 | ASSERT_TRUE(min_value.FitsInPrecision(precision)) << "precision " << precision; |
| 671 | DecimalType max_value(std::numeric_limits<c_type>::max()); |
| 672 | ASSERT_TRUE(max_value.FitsInPrecision(precision)) << "precision " << precision; |
| 673 | } |
| 674 | }; |
| 675 | |
| 676 | TYPED_TEST_SUITE(DecimalFromIntegerTest, DecimalTypes); |
nothing calls this directly
no test coverage detected