diff --git a/src/OrientedBox_TEST.cc b/src/OrientedBox_TEST.cc index d3442ce30..41c935dbd 100644 --- a/src/OrientedBox_TEST.cc +++ b/src/OrientedBox_TEST.cc @@ -328,11 +328,12 @@ TEST(OrientedBoxTest, ContainsOrientedRotation) TEST(OrientedBoxTest, OperatorStreamOut) { OrientedBoxd b(Vector3d(0.1, 1.2, 2.3), - Pose3d(3.4, 4.5, 5.6, 0.0, -0.1, 0.2)); + Pose3d(3.4, 4.5, 5.6, 0.1, -0.1, 0.2)); std::ostringstream stream; stream << b; + EXPECT_EQ(stream.str(), - "Size[0.1 1.2 2.3] Pose[3.4 4.5 5.6 0 -0.1 0.2] Material[]"); + "Size[0.1 1.2 2.3] Pose[3.4 4.5 5.6 0.1 -0.1 0.2] Material[]"); } ////////////////////////////////////////////////// diff --git a/src/SphericalCoordinates_TEST.cc b/src/SphericalCoordinates_TEST.cc index 9af116ec9..ee0702540 100644 --- a/src/SphericalCoordinates_TEST.cc +++ b/src/SphericalCoordinates_TEST.cc @@ -448,7 +448,7 @@ TEST(SphericalCoordinatesTest, NoHeading) auto latLonAlt = sc.SphericalFromLocalPosition({0, 0, 0}); EXPECT_DOUBLE_EQ(lat.Degree(), latLonAlt.X()); EXPECT_DOUBLE_EQ(lon.Degree(), latLonAlt.Y()); - EXPECT_DOUBLE_EQ(elev, latLonAlt.Z()); + EXPECT_NEAR(elev, latLonAlt.Z(), 1e-6); auto xyzOrigin = sc.LocalFromSphericalPosition(latLonAlt); EXPECT_EQ(math::Vector3d::Zero, xyzOrigin); @@ -556,7 +556,7 @@ TEST(SphericalCoordinatesTest, WithHeading) auto latLonAlt = sc.SphericalFromLocalPosition({0, 0, 0}); EXPECT_DOUBLE_EQ(lat.Degree(), latLonAlt.X()); EXPECT_DOUBLE_EQ(lon.Degree(), latLonAlt.Y()); - EXPECT_DOUBLE_EQ(elev, latLonAlt.Z()); + EXPECT_NEAR(elev, latLonAlt.Z(), 1e-6); auto xyzOrigin = sc.LocalFromSphericalPosition(latLonAlt); EXPECT_EQ(math::Vector3d::Zero, xyzOrigin);