Skip to content

Commit

Permalink
Add some test
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Mar 28, 2023
1 parent 4c0fc2f commit acde179
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions velox/functions/sparksql/tests/ArithmeticTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ TEST_F(PmodTest, int64) {
EXPECT_EQ(INT64_MAX - 1, pmod<int64_t>(INT64_MIN, INT64_MAX));
}

TEST_F(PmodTest, float) {
EXPECT_EQ(0.2, pmod<float>(0.5, 0.3));
EXPECT_EQ(0.9, pmod<float>(-1.1, 2));
}

TEST_F(PmodTest, double) {
EXPECT_EQ(0.2, pmod<double>(0.5, 0.3));
EXPECT_EQ(0.9, pmod<double>(-1.1, 2));
}

class RemainderTest : public SparkFunctionBaseTest {
protected:
template <typename T>
Expand Down

0 comments on commit acde179

Please sign in to comment.