From 76435b6da09b21d523ec8df9db5a1547949e6ee0 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Fri, 13 Aug 2021 11:54:51 -0700 Subject: [PATCH] More tests Signed-off-by: Louise Poubel --- .../JointPositionController_TEST.cc | 8 ++------ src/gui/plugins/plot_3d/Plot3D_TEST.cc | 8 ++------ src/systems/physics/EntityFeatureMap_TEST.cc | 5 ++++- test/integration/scene_broadcaster_system.cc | 7 ------- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/gui/plugins/joint_position_controller/JointPositionController_TEST.cc b/src/gui/plugins/joint_position_controller/JointPositionController_TEST.cc index 703fa7de84..72aa9b14cf 100644 --- a/src/gui/plugins/joint_position_controller/JointPositionController_TEST.cc +++ b/src/gui/plugins/joint_position_controller/JointPositionController_TEST.cc @@ -40,6 +40,7 @@ #include "ignition/gazebo/gui/GuiRunner.hh" #include "ignition/gazebo/EntityComponentManager.hh" #include "ignition/gazebo/test_config.hh" +#include "../../../../test/helpers/EnvTestFixture.hh" #include "JointPositionController.hh" @@ -49,13 +50,8 @@ char **g_argv; using namespace ignition; /// \brief Tests for the joint position controller GUI plugin -class JointPositionControllerGui : public ::testing::Test +class JointPositionControllerGui : public InternalFixture<::testing::Test> { - // Documentation inherited - protected: void SetUp() override - { - common::Console::SetVerbosity(4); - } }; ///////////////////////////////////////////////// diff --git a/src/gui/plugins/plot_3d/Plot3D_TEST.cc b/src/gui/plugins/plot_3d/Plot3D_TEST.cc index f34e600409..6e085c3b34 100644 --- a/src/gui/plugins/plot_3d/Plot3D_TEST.cc +++ b/src/gui/plugins/plot_3d/Plot3D_TEST.cc @@ -39,6 +39,7 @@ #include "ignition/gazebo/components/ParentEntity.hh" #include "ignition/gazebo/EntityComponentManager.hh" #include "ignition/gazebo/test_config.hh" +#include "../../../../test/helpers/EnvTestFixture.hh" // Use this when forward-porting to v6 // #include "../../GuiRunner.hh" @@ -55,13 +56,8 @@ char* g_argv[] = using namespace ignition; /// \brief Tests for the joint position controller GUI plugin -class Plot3D : public ::testing::Test +class Plot3D : public InternalFixture<::testing::Test> { - // Documentation inherited - protected: void SetUp() override - { - common::Console::SetVerbosity(4); - } }; ///////////////////////////////////////////////// diff --git a/src/systems/physics/EntityFeatureMap_TEST.cc b/src/systems/physics/EntityFeatureMap_TEST.cc index 9b842031b5..79c5314a87 100644 --- a/src/systems/physics/EntityFeatureMap_TEST.cc +++ b/src/systems/physics/EntityFeatureMap_TEST.cc @@ -30,6 +30,7 @@ #include #include +#include "../../../test/helpers/EnvTestFixture.hh" #include "ignition/gazebo/EntityComponentManager.hh" using namespace ignition; @@ -46,10 +47,12 @@ using EnginePtrType = physics::EnginePtr; -class EntityFeatureMapFixture: public ::testing::Test +class EntityFeatureMapFixture: public InternalFixture<::testing::Test> { protected: void SetUp() override { + InternalFixture::SetUp(); + const std::string pluginLib = "libignition-physics-dartsim-plugin.so"; common::SystemPaths systemPaths; diff --git a/test/integration/scene_broadcaster_system.cc b/test/integration/scene_broadcaster_system.cc index 02afd83a2c..31bdcfc0b3 100644 --- a/test/integration/scene_broadcaster_system.cc +++ b/test/integration/scene_broadcaster_system.cc @@ -35,13 +35,6 @@ using namespace ignition; class SceneBroadcasterTest : public InternalFixture<::testing::TestWithParam> { - // Documentation inherited - protected: void SetUp() override - { - common::Console::SetVerbosity(4); - ignition::common::setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH", - (std::string(PROJECT_BINARY_PATH) + "/lib").c_str()); - } }; /////////////////////////////////////////////////