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

Function TEST

cpp/src/arrow/compute/kernels/scalar_round_arithmetic_test.cc:481–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479TYPED_TEST_SUITE(TestUnaryRoundArithmeticFloating, FloatingTypes);
480
481TEST(TestUnaryRound, DispatchBestRound) {
482 // Integer -> Float64
483 for (std::string name : {"floor", "ceil", "trunc"}) {
484 for (const auto& ty :
485 {int8(), int16(), int32(), int64(), uint8(), uint16(), uint32(), uint64()}) {
486 CheckDispatchBest(name, {ty}, {float64()});
487 CheckDispatchBest(name, {dictionary(int8(), ty)}, {float64()});
488 }
489 }
490 // Integer -> Integer
491 for (std::string name : {"round", "round_to_multiple"}) {
492 for (const auto& ty :
493 {int8(), int16(), int32(), int64(), uint8(), uint16(), uint32(), uint64()}) {
494 CheckDispatchBest(name, {ty}, {ty});
495 CheckDispatchBest(name, {dictionary(int8(), ty)}, {ty});
496 }
497 }
498
499 // Any -> Int32
500 for (std::string name : {"round_binary"}) {
501 for (const auto& ty1 : NumericTypes()) {
502 for (const auto& ty2 : NumericTypes()) {
503 CheckDispatchBest(name, {ty1, ty2}, {ty1, int32()});
504 CheckDispatchBest(name, {dictionary(int8(), ty1), ty2}, {ty1, int32()});
505 }
506 }
507 }
508}
509
510enum class RoundTestCheckFunc {
511 kCheckScalar,

Callers

nothing calls this directly

Calls 2

CheckDispatchBestFunction · 0.85
dictionaryFunction · 0.50

Tested by

no test coverage detected