Skip to content

Commit

Permalink
test: keep plugin test from segfaulting on wrong config
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidPL1 committed Dec 5, 2024
1 parent 24702f7 commit 1042cbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mujoco_ros/test/mujoco_ros_plugin_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class LoadedPluginFixture : public ::testing::Test
{
protected:
std::unique_ptr<ros::NodeHandle> nh;
TestPlugin *test_plugin;
TestPlugin *test_plugin = nullptr;
MujocoEnvTestWrapper *env_ptr;

void SetUp() override
Expand Down Expand Up @@ -96,6 +96,8 @@ class LoadedPluginFixture : public ::testing::Test
break;
}
}

ASSERT_NE(test_plugin, nullptr) << "TestPlugin not found!";
}

void TearDown() override
Expand Down

0 comments on commit 1042cbf

Please sign in to comment.