Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions nav2_system_tests/src/localization/test_localization_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@

using namespace std::chrono_literals;

// rclcpp::init can only be called once per process, so this needs to be a global variable
class RclCppFixture
{
public:
RclCppFixture() {rclcpp::init(0, nullptr);}
~RclCppFixture() {rclcpp::shutdown();}
};
RclCppFixture g_rclcppfixture;

class TestAmclPose : public ::testing::Test
{
public:
Expand Down Expand Up @@ -118,3 +109,16 @@ TEST_F(TestAmclPose, SimpleAmclTest)
{
EXPECT_EQ(true, defaultAmclTest());
}

int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);

rclcpp::init(0, nullptr);

int result = RUN_ALL_TESTS();

rclcpp::shutdown();

return result;
}
Loading