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

Method TestCast

cpp/src/arrow/scalar_test.cc:679–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677 }
678
679 void TestCast() {
680 const auto ty = std::make_shared<T>(3, 2);
681 const auto pi = ScalarType(ValueType(314), ty);
682
683 ASSERT_OK_AND_ASSIGN(auto casted, Cast(pi, utf8()));
684 ASSERT_TRUE(casted.scalar()->Equals(StringScalar("3.14")))
685 << casted.scalar()->ToString();
686 }
687};
688
689TYPED_TEST_SUITE(TestDecimalScalar, DecimalArrowTypes);

Callers

nothing calls this directly

Calls 5

ValueTypeClass · 0.85
StringScalarFunction · 0.70
EqualsMethod · 0.45
scalarMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected