diff --git a/test/BB2B_Test.cc b/test/BB2B_Test.cc index 5659a3c..f36367a 100644 --- a/test/BB2B_Test.cc +++ b/test/BB2B_Test.cc @@ -212,9 +212,9 @@ TEST(BB2B, ObstacleLeft) { diffDrive->GetVelocity(); // this depends on the wheel diameter. EXPECT_FLOAT_EQ(velocity.distance, 0.0F); - float angularVelocity = + Spherical16 angularVelocity = diffDrive->GetAngularVelocity(); // this also depends on wheel separation - EXPECT_FLOAT_EQ(angularVelocity, 90.0F); + EXPECT_FLOAT_EQ(angularVelocity.distance, 90.0F); #pragma endregion } @@ -315,8 +315,8 @@ TEST(BB2B, ObstacleRight) { Spherical16 velocity = diffDrive->GetVelocity(); EXPECT_FLOAT_EQ(velocity.distance, 0.0F); - float angularVelocity = diffDrive->GetAngularVelocity(); - EXPECT_FLOAT_EQ(angularVelocity, -90.0F); + Spherical16 angularVelocity = diffDrive->GetAngularVelocity(); + EXPECT_FLOAT_EQ(angularVelocity.distance, -90.0F); #pragma endregion } @@ -413,8 +413,8 @@ TEST(BB2B, ObstacleBoth) { EXPECT_FLOAT_EQ(velocity.distance, 1.0F); EXPECT_FLOAT_EQ(velocity.direction.horizontal.InDegrees(), -180.0F); - float angularVelocity = diffDrive->GetAngularVelocity(); - EXPECT_FLOAT_EQ(angularVelocity, 0.0F); + Spherical16 angularVelocity = diffDrive->GetAngularVelocity(); + EXPECT_FLOAT_EQ(angularVelocity.distance, 0.0F); #pragma endregion }