Skip to content

Commit 3b80549

Browse files
committed
review feedback for integration test
Signed-off-by: Ashton Larkin <[email protected]>
1 parent 982f840 commit 3b80549

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

test/integration/physics_system.cc

+8-7
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ TEST_F(PhysicsSystemFixture, NestedModelIndividualCanonicalLinks)
13241324
EXPECT_EQ(6u, postUpModelPoses.size());
13251325

13261326
auto modelIt = postUpModelPoses.find("model_00");
1327-
EXPECT_NE(postUpModelPoses.end(), modelIt);
1327+
ASSERT_NE(postUpModelPoses.end(), modelIt);
13281328

13291329
// link_00 is resting on the ground_box, so it remains stationary. And since
13301330
// it is the canonical link of the parent model, model_00, the model frame
@@ -1338,25 +1338,26 @@ TEST_F(PhysicsSystemFixture, NestedModelIndividualCanonicalLinks)
13381338
const double dt = 0.001;
13391339
const double zExpected = 0.5 * world->Gravity().Z() * pow(dt * iters, 2);
13401340
modelIt = postUpModelPoses.find("model_01");
1341-
EXPECT_NE(postUpModelPoses.end(), modelIt);
1341+
ASSERT_NE(postUpModelPoses.end(), modelIt);
13421342
EXPECT_NEAR(zExpected, modelIt->second.Z(), 1e-2);
13431343

1344-
// model_10, model_11 and model_12 share the same canonical link (link_11),
1345-
// which is a floating link. So, link_11 should fall due to gravity, which
1344+
// model_10, model_11 and model_12 share the same canonical link (link_12),
1345+
// which is a floating link. So, link_12 should fall due to gravity, which
13461346
// also means that the frames for model_10, model_11 and model_12 should fall
13471347
auto model10It = postUpModelPoses.find("model_10");
1348-
EXPECT_NE(postUpModelPoses.end(), model10It);
1348+
ASSERT_NE(postUpModelPoses.end(), model10It);
13491349
EXPECT_NEAR(zExpected, model10It->second.Z(), 1e-2);
13501350
auto model11It = postUpModelPoses.find("model_11");
1351-
EXPECT_NE(postUpModelPoses.end(), model11It);
1351+
ASSERT_NE(postUpModelPoses.end(), model11It);
13521352
auto model12It = postUpModelPoses.find("model_12");
1353-
EXPECT_NE(postUpModelPoses.end(), model12It);
1353+
ASSERT_NE(postUpModelPoses.end(), model12It);
13541354
// (since model_11 and model_12 are nested, their poses are computed w.r.t.
13551355
// model_10)
13561356
EXPECT_DOUBLE_EQ(0.0, model11It->second.Z());
13571357
EXPECT_DOUBLE_EQ(0.0, model12It->second.Z());
13581358
// check the world pose of model_11 and model_12 to make sure the z components
13591359
// of these world poses match zExpected
1360+
ASSERT_NE(nullptr, ecm);
13601361
const auto model11Entity =
13611362
ecm->EntityByComponents(components::Name(model11It->first));
13621363
ASSERT_NE(kNullEntity, model11Entity);

0 commit comments

Comments
 (0)