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

Function CheckDecimalToRealApprox

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

Source from the content-addressed store, hash-verified

1140
1141template <typename Decimal>
1142void CheckDecimalToRealApprox(const std::string& decimal_value, int32_t scale,
1143 float expected) {
1144 Decimal dec(decimal_value);
1145 float actual = dec.template ToReal<float>(scale);
1146 ASSERT_FLOAT_EQ(actual, expected)
1147 << "Decimal value: " << decimal_value << ", scale: " << scale
1148 << ", expected: " << expected << ", actual: " << actual;
1149}
1150
1151template <typename Decimal>
1152void CheckDecimalToRealApprox(const std::string& decimal_value, int32_t scale,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected