| 479 | TYPED_TEST_SUITE(TestUnaryRoundArithmeticFloating, FloatingTypes); |
| 480 | |
| 481 | TEST(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 | |
| 510 | enum class RoundTestCheckFunc { |
| 511 | kCheckScalar, |
nothing calls this directly
no test coverage detected