AP_Math: add test for is_equal for int

This commit is contained in:
Pierre Kancir 2016-12-17 19:17:11 +01:00 committed by Francisco Ferreira
parent da49149d19
commit eae093cd2a

View File

@ -74,6 +74,8 @@ TEST(MathTest, IsZero)
TEST(MathTest, IsEqual) TEST(MathTest, IsEqual)
{ {
EXPECT_FALSE(is_equal(1, 0));
EXPECT_TRUE(is_equal(1, 1));
EXPECT_FALSE(is_equal(0.1, 0.10001)); EXPECT_FALSE(is_equal(0.1, 0.10001));
EXPECT_FALSE(is_equal(0.1, -0.1001)); EXPECT_FALSE(is_equal(0.1, -0.1001));
EXPECT_TRUE(is_equal(0.f, 0.0f)); EXPECT_TRUE(is_equal(0.f, 0.0f));