forked from Archive/PX4-Autopilot
FunctionsTest: add isFinite() tests with Vector3f arguments
This commit is contained in:
parent
5ca28dd6dc
commit
870229ef49
|
@ -224,3 +224,17 @@ TEST(FunctionsTest, countSetBits)
|
|||
EXPECT_EQ(countSetBits(0xffffffffu), 32);
|
||||
EXPECT_EQ(countSetBits(754323), 9);
|
||||
}
|
||||
|
||||
TEST(FunctionsTest, isFiniteVector3f)
|
||||
{
|
||||
EXPECT_TRUE(isFinite(matrix::Vector3f()));
|
||||
EXPECT_TRUE(isFinite(matrix::Vector3f(0.f, 1.f, 2.f)));
|
||||
EXPECT_FALSE(isFinite(matrix::Vector3f(0.f, 0.f, INFINITY)));
|
||||
EXPECT_FALSE(isFinite(matrix::Vector3f(0.f, 0.f, NAN)));
|
||||
EXPECT_FALSE(isFinite(matrix::Vector3f(0.f, NAN, 0.f)));
|
||||
EXPECT_FALSE(isFinite(matrix::Vector3f(0.f, NAN, NAN)));
|
||||
EXPECT_FALSE(isFinite(matrix::Vector3f(NAN, 0.f, 0.f)));
|
||||
EXPECT_FALSE(isFinite(matrix::Vector3f(NAN, 0.f, NAN)));
|
||||
EXPECT_FALSE(isFinite(matrix::Vector3f(NAN, NAN, 0.f)));
|
||||
EXPECT_FALSE(isFinite(matrix::Vector3f(NAN, NAN, NAN)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue