Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
  • Loading branch information
scpeters committed Nov 3, 2022
1 parent 6580927 commit 985f38a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/integration/urdf_gazebo_extensions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ TEST(SDFParser, UrdfGazeboExtensionURDFTest)

auto modelDom = root.ModelByIndex(0);
ASSERT_NE(nullptr, modelDom);

// Verify that model is not static
EXPECT_FALSE(modelDom->Static());

sdf::ElementPtr model = modelDom->Element();
for (sdf::ElementPtr joint = model->GetElement("joint"); joint;
joint = joint->GetNextElement("joint"))
Expand Down Expand Up @@ -398,6 +402,7 @@ TEST(SDFParser, FixedJointSimple)
auto model = root.ModelByIndex(0);
ASSERT_NE(nullptr, model);
EXPECT_EQ("fixed_joint_simple", model->Name());
EXPECT_FALSE(model->Static());

EXPECT_EQ(1u, model->LinkCount());
EXPECT_TRUE(model->LinkNameExists("base"));
Expand Down
5 changes: 5 additions & 0 deletions test/integration/urdf_gazebo_extensions.urdf
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" ?>
<robot name="urdf_gazebo_extension_test">

<gazebo>
<!-- Explicitly declare that model is not static. -->
<static>0</static>
</gazebo>

<link name="world"/>

<joint name="jointw0" type="continuous">
Expand Down

0 comments on commit 985f38a

Please sign in to comment.