File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,5 +139,21 @@ TEST(check_cmd, IGN_UTILS_TEST_DISABLED_ON_WIN32(SDF))
139139 EXPECT_TRUE (world->ModelByName (" ground_plane" )->Static ());
140140 ASSERT_NE (nullptr , world->ModelByName (" box" ));
141141 EXPECT_FALSE (world->ModelByName (" box" )->Static ());
142+
143+ // check that models have the right links
144+ std::function<void (const std::string &, const std::string &)> checkLink =
145+ [&world](const std::string &_modelName, const std::string &_linkName)
146+ {
147+ const auto modelPtr = world->ModelByName (_modelName);
148+ ASSERT_NE (nullptr , modelPtr);
149+ EXPECT_EQ (1u , modelPtr->LinkCount ());
150+ EXPECT_NE (nullptr , modelPtr->LinkByName (_linkName));
151+ };
152+ checkLink (" ground_plane" , " link" );
153+ checkLink (" box" , " box_link" );
154+ checkLink (" cylinder" , " cylinder_link" );
155+ checkLink (" sphere" , " sphere_link" );
156+ checkLink (" capsule" , " capsule_link" );
157+ checkLink (" ellipsoid" , " ellipsoid_link" );
142158 }
143159}
You can’t perform that action at this time.
0 commit comments