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

Method CheckConstructFrom

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

Source from the content-addressed store, hash-verified

603 public:
604 template <typename IntegerType>
605 void CheckConstructFrom() {
606 DecimalType value(IntegerType{42});
607 AssertArrayBits(value.little_endian_array(), 42, 0);
608
609 DecimalType max_value(std::numeric_limits<IntegerType>::max());
610 AssertArrayBits(max_value.little_endian_array(),
611 std::numeric_limits<IntegerType>::max(), 0);
612
613 DecimalType min_value(std::numeric_limits<IntegerType>::min());
614 AssertArrayBits(min_value.little_endian_array(),
615 std::numeric_limits<IntegerType>::min(),
616 (std::is_signed<IntegerType>::value ? -1 : 0));
617 }
618
619 void TestConstructibleFromAnyIntegerType() {
620 CheckConstructFrom<char>(); // NOLINT

Callers

nothing calls this directly

Calls 2

AssertArrayBitsFunction · 0.85
little_endian_arrayMethod · 0.80

Tested by

no test coverage detected