Fix unit tests
This commit is contained in:
parent
6356769aa9
commit
40c1e1d50c
@ -212,9 +212,9 @@ TEST(BB2B, ObstacleLeft) {
|
|||||||
diffDrive->GetVelocity(); // this depends on the wheel diameter.
|
diffDrive->GetVelocity(); // this depends on the wheel diameter.
|
||||||
EXPECT_FLOAT_EQ(velocity.distance, 0.0F);
|
EXPECT_FLOAT_EQ(velocity.distance, 0.0F);
|
||||||
|
|
||||||
float angularVelocity =
|
Spherical16 angularVelocity =
|
||||||
diffDrive->GetAngularVelocity(); // this also depends on wheel separation
|
diffDrive->GetAngularVelocity(); // this also depends on wheel separation
|
||||||
EXPECT_FLOAT_EQ(angularVelocity, 90.0F);
|
EXPECT_FLOAT_EQ(angularVelocity.distance, 90.0F);
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
}
|
}
|
||||||
@ -315,8 +315,8 @@ TEST(BB2B, ObstacleRight) {
|
|||||||
Spherical16 velocity = diffDrive->GetVelocity();
|
Spherical16 velocity = diffDrive->GetVelocity();
|
||||||
EXPECT_FLOAT_EQ(velocity.distance, 0.0F);
|
EXPECT_FLOAT_EQ(velocity.distance, 0.0F);
|
||||||
|
|
||||||
float angularVelocity = diffDrive->GetAngularVelocity();
|
Spherical16 angularVelocity = diffDrive->GetAngularVelocity();
|
||||||
EXPECT_FLOAT_EQ(angularVelocity, -90.0F);
|
EXPECT_FLOAT_EQ(angularVelocity.distance, -90.0F);
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
}
|
}
|
||||||
@ -413,8 +413,8 @@ TEST(BB2B, ObstacleBoth) {
|
|||||||
EXPECT_FLOAT_EQ(velocity.distance, 1.0F);
|
EXPECT_FLOAT_EQ(velocity.distance, 1.0F);
|
||||||
EXPECT_FLOAT_EQ(velocity.direction.horizontal.InDegrees(), -180.0F);
|
EXPECT_FLOAT_EQ(velocity.direction.horizontal.InDegrees(), -180.0F);
|
||||||
|
|
||||||
float angularVelocity = diffDrive->GetAngularVelocity();
|
Spherical16 angularVelocity = diffDrive->GetAngularVelocity();
|
||||||
EXPECT_FLOAT_EQ(angularVelocity, 0.0F);
|
EXPECT_FLOAT_EQ(angularVelocity.distance, 0.0F);
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user