MCPcopy Create free account
hub / github.com/apache/arrow / TestNumericLimit

Method TestNumericLimit

cpp/src/arrow/util/decimal_test.cc:664–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
676TYPED_TEST_SUITE(DecimalFromIntegerTest, DecimalTypes);

Callers

nothing calls this directly

Calls 1

FitsInPrecisionMethod · 0.80

Tested by

no test coverage detected