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

Method GetValues

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

Source from the content-addressed store, hash-verified

917class TestDecimalFromRealFloat : public ::testing::Test {
918 protected:
919 std::vector<FromFloatTestParam> GetValues() {
920 return {
921 // -- Stress the 24 bits of precision of a float
922 // 2**63 + 2**40
923 FromFloatTestParam{9.223373e+18f, 19, 0, "9223373136366403584"},
924 // 2**64 - 2**40
925 FromFloatTestParam{1.8446743e+19f, 20, 0, "18446742974197923840"},
926 // 2**64 + 2**41
927 FromFloatTestParam{1.8446746e+19f, 20, 0, "18446746272732807168"},
928 // 2**14 - 2**-10
929 FromFloatTestParam{16383.999f, 8, 3, "16383.999"},
930 FromFloatTestParam{16383.999f, 19, 3, "16383.999"},
931 // 1 - 2**-24
932 FromFloatTestParam{0.99999994f, 10, 10, "0.9999999404"},
933 FromFloatTestParam{0.99999994f, 15, 15, "0.999999940395355"},
934 FromFloatTestParam{0.99999994f, 20, 20, "0.99999994039535522461"},
935 FromFloatTestParam{0.99999994f, 21, 21, "0.999999940395355224609"},
936 FromFloatTestParam{0.99999994f, 38, 38,
937 "0.99999994039535522460937500000000000000"},
938 // -- Other cases
939 // 10**38 - 2**103
940 FromFloatTestParam{9.999999e+37f, 38, 0,
941 "99999986661652122824821048795547566080"},
942 };
943 }
944};
945TYPED_TEST_SUITE(TestDecimalFromRealFloat, DecimalTypes);
946

Callers 1

TYPED_TESTFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected