From 3b80549f4aad76e1cb54ee06d9fcec077ae2021c Mon Sep 17 00:00:00 2001 From: Ashton Larkin Date: Tue, 11 May 2021 17:45:33 -0400 Subject: [PATCH] review feedback for integration test Signed-off-by: Ashton Larkin --- test/integration/physics_system.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/integration/physics_system.cc b/test/integration/physics_system.cc index f2b5907eb09..e1ac1762ec1 100644 --- a/test/integration/physics_system.cc +++ b/test/integration/physics_system.cc @@ -1324,7 +1324,7 @@ TEST_F(PhysicsSystemFixture, NestedModelIndividualCanonicalLinks) EXPECT_EQ(6u, postUpModelPoses.size()); auto modelIt = postUpModelPoses.find("model_00"); - EXPECT_NE(postUpModelPoses.end(), modelIt); + ASSERT_NE(postUpModelPoses.end(), modelIt); // link_00 is resting on the ground_box, so it remains stationary. And since // it is the canonical link of the parent model, model_00, the model frame @@ -1338,25 +1338,26 @@ TEST_F(PhysicsSystemFixture, NestedModelIndividualCanonicalLinks) const double dt = 0.001; const double zExpected = 0.5 * world->Gravity().Z() * pow(dt * iters, 2); modelIt = postUpModelPoses.find("model_01"); - EXPECT_NE(postUpModelPoses.end(), modelIt); + ASSERT_NE(postUpModelPoses.end(), modelIt); EXPECT_NEAR(zExpected, modelIt->second.Z(), 1e-2); - // model_10, model_11 and model_12 share the same canonical link (link_11), - // which is a floating link. So, link_11 should fall due to gravity, which + // model_10, model_11 and model_12 share the same canonical link (link_12), + // which is a floating link. So, link_12 should fall due to gravity, which // also means that the frames for model_10, model_11 and model_12 should fall auto model10It = postUpModelPoses.find("model_10"); - EXPECT_NE(postUpModelPoses.end(), model10It); + ASSERT_NE(postUpModelPoses.end(), model10It); EXPECT_NEAR(zExpected, model10It->second.Z(), 1e-2); auto model11It = postUpModelPoses.find("model_11"); - EXPECT_NE(postUpModelPoses.end(), model11It); + ASSERT_NE(postUpModelPoses.end(), model11It); auto model12It = postUpModelPoses.find("model_12"); - EXPECT_NE(postUpModelPoses.end(), model12It); + ASSERT_NE(postUpModelPoses.end(), model12It); // (since model_11 and model_12 are nested, their poses are computed w.r.t. // model_10) EXPECT_DOUBLE_EQ(0.0, model11It->second.Z()); EXPECT_DOUBLE_EQ(0.0, model12It->second.Z()); // check the world pose of model_11 and model_12 to make sure the z components // of these world poses match zExpected + ASSERT_NE(nullptr, ecm); const auto model11Entity = ecm->EntityByComponents(components::Name(model11It->first)); ASSERT_NE(kNullEntity, model11Entity);