From b519521e1a956bbc54239eda2ae0445522d239b7 Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Thu, 12 Dec 2024 11:17:01 +0100 Subject: [PATCH] rename --- .../Algorithm/tests/CollisionPipeline_test.cpp | 4 ++-- .../tests/LocalMinDistance_test.cpp | 4 ++-- .../Collision/Geometry/tests/Sphere_test.cpp | 4 ++-- .../Collision/Geometry/tests/Triangle_test.cpp | 4 ++-- .../AffineMovementProjectiveConstraint_test.cpp | 2 +- .../DirectionProjectiveConstraint_test.cpp | 4 ++-- .../tests/LineProjectiveConstraint_test.cpp | 4 ++-- .../tests/PlaneProjectiveConstraint_test.cpp | 4 ++-- .../tests/PointProjectiveConstraint_test.cpp | 4 ++-- .../Engine/Analyze/tests/AverageCoord_test.cpp | 2 +- .../Analyze/tests/ClusteringEngine_test.cpp | 2 +- .../tests/ExtrudeEdgesAndGenerateQuads_test.cpp | 2 +- .../Engine/Generate/tests/MergePoints_test.cpp | 2 +- .../Engine/Select/tests/BoxROI_test.cpp | 4 ++-- .../Select/tests/ComplementaryROI_test.cpp | 2 +- .../Engine/Select/tests/MeshROI_test.cpp | 4 ++-- .../Select/tests/MeshSubsetEngine_test.cpp | 4 ++-- .../Engine/Select/tests/PlaneROI_test.cpp | 2 +- .../Engine/Select/tests/SphereROI_test.cpp | 2 +- .../Transform/tests/DifferenceEngine_test.cpp | 2 +- .../Transform/tests/DilateEngine_test.cpp | 2 +- .../Transform/tests/SmoothMeshEngine_test.cpp | 2 +- .../IO/Mesh/tests/MeshExporter_test.cpp | 4 ++-- .../IO/Mesh/tests/MeshGmshLoader_test.cpp | 2 +- .../IO/Mesh/tests/STLExporter_test.cpp | 4 ++-- .../Mesh/tests/VisualModelOBJExporter_test.cpp | 4 ++-- .../Linear/tests/BarycentricMapping_test.cpp | 2 +- .../NonLinear/tests/RigidMapping_test.cpp | 2 +- .../tests/SquareDistanceMapping_test.cpp | 2 +- Sofa/Component/Mass/tests/DiagonalMass_test.cpp | 4 ++-- .../Mass/tests/MeshMatrixMass_test.cpp | 4 ++-- Sofa/Component/Mass/tests/UniformMass_test.cpp | 4 ++-- .../tests/ConstantForceField_test.cpp | 4 ++-- .../tests/PlaneForceField_test.cpp | 4 ++-- .../tests/SkeletalMotionConstraint_test.cpp | 4 ++-- .../Backward/tests/SpringSolverDynamic_test.cpp | 2 +- .../Backward/tests/StaticSolver_test.cpp | 4 ++-- .../Playback/tests/WriteState_test.cpp | 4 ++-- .../tests/AddResourceRepository_test.cpp | 2 +- .../tests/BaseTetrahedronFEMForceField_test.h | 4 ++-- .../Elastic/tests/BeamFEMForceField_test.cpp | 4 ++-- .../tests/TriangleFEMForceField_test.cpp | 4 ++-- ...HyperelasticityFEMForceField_params_test.cpp | 2 +- ...nHyperelasticityFEMForceField_scene_test.cpp | 2 +- .../tests/TriangularBendingSprings_test.cpp | 4 ++-- .../simutests/AffinePatch_test.cpp | 2 +- .../simutests/LinearElasticity_test.cpp | 4 ++-- .../TetrahedronNumericalIntegration_test.cpp | 4 ++-- .../tests/TriangleNumericalIntegration_test.cpp | 4 ++-- .../Grid/tests/SparseGridTopology_test.cpp | 2 +- .../tests/TopologicalChangeProcessor_test.cpp | 4 ++-- .../Utility/tests/TopologyChecker_test.cpp | 4 ++-- .../Rendering2D/tests/OglLabel_test.cpp | 2 +- .../Rendering3D/tests/ClipPlane_test.cpp | 2 +- .../Shader/tests/LightManager_test.cpp | 2 +- Sofa/GL/Component/Shader/tests/Light_test.cpp | 2 +- Sofa/framework/Core/test/DataEngine_test.cpp | 2 +- Sofa/framework/Core/test/Engine_test.cpp | 2 +- Sofa/framework/Core/test/TrackedData_test.cpp | 2 +- .../objectmodel/BaseObjectDescription_test.cpp | 4 ++-- .../Core/test/objectmodel/DataFileName_test.cpp | 2 +- .../Core/test/objectmodel/DataLink_test.cpp | 4 ++-- .../Core/test/objectmodel/SingleLink_test.cpp | 2 +- .../Helper/simutest/AdvancedTimer_test.cpp | 2 +- Sofa/framework/Helper/test/io/MeshOBJ_test.cpp | 4 ++-- Sofa/framework/Helper/test/io/STBImage_test.cpp | 4 ++-- .../framework/Helper/test/io/XspLoader_test.cpp | 4 ++-- .../Helper/test/system/PluginManager_test.cpp | 4 ++-- .../BaseMatrix_test.h | 4 ++-- .../Graph/test/MutationListener_test.cpp | 4 ++-- .../Testing/src/sofa/testing/BaseTest.cpp | 4 ++-- .../Testing/src/sofa/testing/BaseTest.h | 6 ++++++ .../Testing/src/sofa/testing/config.h.in | 17 +++++++++++++++++ Sofa/framework/Type/test/MatSym_test.cpp | 2 +- .../CImgPlugin_test/ImageCImg_test.cpp | 4 ++-- .../SceneCreator_test/SceneCreator_test.cpp | 2 +- .../plugins/image/image_test/DataImage_test.cpp | 2 +- .../image/image_test/ImageEngine_test.cpp | 2 +- .../SceneChecking/tests/SceneChecker_test.cpp | 2 +- .../runSofa/runSofa_test/runSofa_test.cpp | 4 ++-- 80 files changed, 143 insertions(+), 120 deletions(-) diff --git a/Sofa/Component/Collision/Detection/Algorithm/tests/CollisionPipeline_test.cpp b/Sofa/Component/Collision/Detection/Algorithm/tests/CollisionPipeline_test.cpp index 7e95d47ecd38..f8a830109c94 100644 --- a/Sofa/Component/Collision/Detection/Algorithm/tests/CollisionPipeline_test.cpp +++ b/Sofa/Component/Collision/Detection/Algorithm/tests/CollisionPipeline_test.cpp @@ -74,13 +74,13 @@ class TestCollisionPipeline : public BaseSimulationTest { void checkCollisionPipelineWithMissingContactManager(); int checkCollisionPipelineWithMonkeyValueForDepth(int value); - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.StateContainer"); sofa::simpleapi::importPlugin("Sofa.Component.Collision"); } - void onTearDown() override + void doTearDown() override { if (root) sofa::simulation::node::unload(root); diff --git a/Sofa/Component/Collision/Detection/Intersection/tests/LocalMinDistance_test.cpp b/Sofa/Component/Collision/Detection/Intersection/tests/LocalMinDistance_test.cpp index 4a42457697c2..dd431d6fcd5f 100644 --- a/Sofa/Component/Collision/Detection/Intersection/tests/LocalMinDistance_test.cpp +++ b/Sofa/Component/Collision/Detection/Intersection/tests/LocalMinDistance_test.cpp @@ -54,12 +54,12 @@ namespace { struct TestLocalMinDistance : public BaseSimulationTest { - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.StateContainer"); sofa::simpleapi::importPlugin("Sofa.Component.Collision.Detection.Intersection"); } - void onTearDown() override + void doTearDown() override { } diff --git a/Sofa/Component/Collision/Geometry/tests/Sphere_test.cpp b/Sofa/Component/Collision/Geometry/tests/Sphere_test.cpp index 2d0094538ed5..a9c8209739f6 100644 --- a/Sofa/Component/Collision/Geometry/tests/Sphere_test.cpp +++ b/Sofa/Component/Collision/Geometry/tests/Sphere_test.cpp @@ -70,7 +70,7 @@ namespace sofa { struct TestSphere : public BaseSimulationTest { - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.StateContainer"); sofa::simpleapi::importPlugin("Sofa.Component.Collision.Geometry"); @@ -79,7 +79,7 @@ struct TestSphere : public BaseSimulationTest m_proxIntersection->setAlarmDistance(1.0); m_proxIntersection->setContactDistance(1.0); } - void onTearDown() override + void doTearDown() override { } diff --git a/Sofa/Component/Collision/Geometry/tests/Triangle_test.cpp b/Sofa/Component/Collision/Geometry/tests/Triangle_test.cpp index f59f632f3704..e6f8567a2629 100644 --- a/Sofa/Component/Collision/Geometry/tests/Triangle_test.cpp +++ b/Sofa/Component/Collision/Geometry/tests/Triangle_test.cpp @@ -56,10 +56,10 @@ namespace sofa { struct TestTriangle : public BaseTest { - void onSetUp() override + void doSetUp() override { } - void onTearDown() override + void doTearDown() override { } diff --git a/Sofa/Component/Constraint/Projective/tests/AffineMovementProjectiveConstraint_test.cpp b/Sofa/Component/Constraint/Projective/tests/AffineMovementProjectiveConstraint_test.cpp index ee3af703c700..4b4f258cb12c 100644 --- a/Sofa/Component/Constraint/Projective/tests/AffineMovementProjectiveConstraint_test.cpp +++ b/Sofa/Component/Constraint/Projective/tests/AffineMovementProjectiveConstraint_test.cpp @@ -70,7 +70,7 @@ struct AffineMovementProjectiveConstraint_test : public BaseSimulationTest, Nume sofa::helper::RandomGenerator randomGenerator; // Create the context for the scene - void onSetUp() override + void doSetUp() override { // Init simulation simulation = sofa::simulation::getSimulation(); diff --git a/Sofa/Component/Constraint/Projective/tests/DirectionProjectiveConstraint_test.cpp b/Sofa/Component/Constraint/Projective/tests/DirectionProjectiveConstraint_test.cpp index f2f792ebedb6..d599139cb257 100644 --- a/Sofa/Component/Constraint/Projective/tests/DirectionProjectiveConstraint_test.cpp +++ b/Sofa/Component/Constraint/Projective/tests/DirectionProjectiveConstraint_test.cpp @@ -69,7 +69,7 @@ struct DirectionProjectiveConstraint_test : public BaseSimulationTest, NumericTe typename MechanicalObject::SPtr dofs; /// Create the context for the tests. - void onSetUp() override + void doSetUp() override { //Init simulation = sofa::simulation::getSimulation(); @@ -219,7 +219,7 @@ struct DirectionProjectiveConstraint_test : public BaseSimulationTest, NumericTe return succeed; } - void onTearDown() override + void doTearDown() override { if (root!=nullptr) sofa::simulation::node::unload(root); diff --git a/Sofa/Component/Constraint/Projective/tests/LineProjectiveConstraint_test.cpp b/Sofa/Component/Constraint/Projective/tests/LineProjectiveConstraint_test.cpp index bd343df22961..07e2dc61dc7f 100644 --- a/Sofa/Component/Constraint/Projective/tests/LineProjectiveConstraint_test.cpp +++ b/Sofa/Component/Constraint/Projective/tests/LineProjectiveConstraint_test.cpp @@ -68,7 +68,7 @@ struct LineProjectiveConstraint_test : public BaseSimulationTest, NumericTest::SPtr m_mecaobject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/Engine/Analyze/tests/ClusteringEngine_test.cpp b/Sofa/Component/Engine/Analyze/tests/ClusteringEngine_test.cpp index acbf97d640b0..b57ca438e54a 100644 --- a/Sofa/Component/Engine/Analyze/tests/ClusteringEngine_test.cpp +++ b/Sofa/Component/Engine/Analyze/tests/ClusteringEngine_test.cpp @@ -57,7 +57,7 @@ struct ClusteringEngine_test : public BaseSimulationTest, typename MechanicalObject::SPtr m_mecaobject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/Engine/Generate/tests/ExtrudeEdgesAndGenerateQuads_test.cpp b/Sofa/Component/Engine/Generate/tests/ExtrudeEdgesAndGenerateQuads_test.cpp index d8621e0f962b..c7a2fdd853c9 100644 --- a/Sofa/Component/Engine/Generate/tests/ExtrudeEdgesAndGenerateQuads_test.cpp +++ b/Sofa/Component/Engine/Generate/tests/ExtrudeEdgesAndGenerateQuads_test.cpp @@ -55,7 +55,7 @@ struct ExtrudeEdgesAndGenerateQuads_test : public BaseSimulationTest, Node::SPtr m_node; typename ThisClass::SPtr m_thisObject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/Engine/Generate/tests/MergePoints_test.cpp b/Sofa/Component/Engine/Generate/tests/MergePoints_test.cpp index fd534557ec19..5f50d949e1fe 100644 --- a/Sofa/Component/Engine/Generate/tests/MergePoints_test.cpp +++ b/Sofa/Component/Engine/Generate/tests/MergePoints_test.cpp @@ -49,7 +49,7 @@ struct MergePoints_test : public BaseSimulationTest, Simulation* m_simu; typename ThisClass::SPtr m_thisObject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/Engine/Select/tests/BoxROI_test.cpp b/Sofa/Component/Engine/Select/tests/BoxROI_test.cpp index c695c34e8844..9bfce6d3005a 100644 --- a/Sofa/Component/Engine/Select/tests/BoxROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/BoxROI_test.cpp @@ -70,7 +70,7 @@ struct BoxROITest : public sofa::testing::BaseTest Node::SPtr m_node; typename TheBoxROI::SPtr m_boxroi; - void onSetUp() override + void doSetUp() override { this->loadPlugins({ "Sofa.Component.StateContainer", @@ -87,7 +87,7 @@ struct BoxROITest : public sofa::testing::BaseTest m_node->addObject(m_boxroi); } - void onTearDown() override + void doTearDown() override { if (m_root != nullptr){ sofa::simulation::node::unload(m_root); diff --git a/Sofa/Component/Engine/Select/tests/ComplementaryROI_test.cpp b/Sofa/Component/Engine/Select/tests/ComplementaryROI_test.cpp index 7a2bdef62855..ec055b0321aa 100644 --- a/Sofa/Component/Engine/Select/tests/ComplementaryROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/ComplementaryROI_test.cpp @@ -55,7 +55,7 @@ struct ComplementaryROI_test : public BaseSimulationTest, typename ThisClass::SPtr m_thisObject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/Engine/Select/tests/MeshROI_test.cpp b/Sofa/Component/Engine/Select/tests/MeshROI_test.cpp index 9c5d3d6c618f..a246172ec442 100644 --- a/Sofa/Component/Engine/Select/tests/MeshROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/MeshROI_test.cpp @@ -61,7 +61,7 @@ struct MeshROI_test : public BaseSimulationTest, Node::SPtr m_root; ThisClass* m_thisObject; - void onSetUp() override + void doSetUp() override { simpleapi::importPlugin("Sofa.Component.Engine.Select"); simpleapi::importPlugin("Sofa.Component.Topology.Container.Constant"); @@ -86,7 +86,7 @@ struct MeshROI_test : public BaseSimulationTest, ASSERT_NE(m_thisObject, nullptr) ; } - void onTearDown() override + void doTearDown() override { sofa::simulation::node::unload(m_root) ; } diff --git a/Sofa/Component/Engine/Select/tests/MeshSubsetEngine_test.cpp b/Sofa/Component/Engine/Select/tests/MeshSubsetEngine_test.cpp index 264c3383c338..ef9f5baf3b8b 100644 --- a/Sofa/Component/Engine/Select/tests/MeshSubsetEngine_test.cpp +++ b/Sofa/Component/Engine/Select/tests/MeshSubsetEngine_test.cpp @@ -31,7 +31,7 @@ struct MeshSubsetEngine_test : public testing::BaseSimulationTest sofa::simulation::Node::SPtr m_root; typename component::engine::select::MeshSubsetEngine<_DataTypes>::SPtr m_engine; - void onSetUp() override + void doSetUp() override { simpleapi::importPlugin("Sofa.Component.Engine.Select"); @@ -44,7 +44,7 @@ struct MeshSubsetEngine_test : public testing::BaseSimulationTest m_root->addObject(m_engine); } - void onTearDown() override + void doTearDown() override { sofa::simulation::node::unload(m_root) ; } diff --git a/Sofa/Component/Engine/Select/tests/PlaneROI_test.cpp b/Sofa/Component/Engine/Select/tests/PlaneROI_test.cpp index 7c1ce5b96b5a..628d8b977716 100644 --- a/Sofa/Component/Engine/Select/tests/PlaneROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/PlaneROI_test.cpp @@ -61,7 +61,7 @@ struct PlaneROI_test : public BaseSimulationTest, Node::SPtr m_node1, m_node2; typename ThisClass::SPtr m_thisObject; - void onSetUp() override + void doSetUp() override { // SetUp1 m_simu = sofa::simulation::getSimulation(); diff --git a/Sofa/Component/Engine/Select/tests/SphereROI_test.cpp b/Sofa/Component/Engine/Select/tests/SphereROI_test.cpp index 1c78610fb1fa..0bfb8a123877 100644 --- a/Sofa/Component/Engine/Select/tests/SphereROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/SphereROI_test.cpp @@ -61,7 +61,7 @@ struct SphereROI_test : public BaseSimulationTest, Node::SPtr m_node; typename ThisClass::SPtr m_thisObject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/Engine/Transform/tests/DifferenceEngine_test.cpp b/Sofa/Component/Engine/Transform/tests/DifferenceEngine_test.cpp index c9b4e149d848..d2f7ecddbbd3 100644 --- a/Sofa/Component/Engine/Transform/tests/DifferenceEngine_test.cpp +++ b/Sofa/Component/Engine/Transform/tests/DifferenceEngine_test.cpp @@ -54,7 +54,7 @@ struct DifferenceEngine_test : public BaseSimulationTest, Node::SPtr m_node; typename ThisClass::SPtr m_thisObject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/Engine/Transform/tests/DilateEngine_test.cpp b/Sofa/Component/Engine/Transform/tests/DilateEngine_test.cpp index fe97eb135b6e..bbed29b8fa5e 100644 --- a/Sofa/Component/Engine/Transform/tests/DilateEngine_test.cpp +++ b/Sofa/Component/Engine/Transform/tests/DilateEngine_test.cpp @@ -52,7 +52,7 @@ struct DilateEngine_test : public BaseSimulationTest, Node::SPtr m_node; typename ThisClass::SPtr m_thisObject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/Engine/Transform/tests/SmoothMeshEngine_test.cpp b/Sofa/Component/Engine/Transform/tests/SmoothMeshEngine_test.cpp index e96e279d2675..d28d41321e96 100644 --- a/Sofa/Component/Engine/Transform/tests/SmoothMeshEngine_test.cpp +++ b/Sofa/Component/Engine/Transform/tests/SmoothMeshEngine_test.cpp @@ -53,7 +53,7 @@ struct SmoothMeshEngine_test : public BaseSimulationTest, Node::SPtr m_node; typename ThisClass::SPtr m_thisObject; - void onSetUp() override + void doSetUp() override { m_simu = sofa::simulation::getSimulation(); ASSERT_NE(m_simu, nullptr); diff --git a/Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp b/Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp index 02594da5d227..1f95de868898 100644 --- a/Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp +++ b/Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp @@ -75,13 +75,13 @@ class MeshExporter_test /// remove the file created... std::vector dataPath; - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.StateContainer"); sofa::simpleapi::importPlugin("Sofa.Component.Topology.Container.Grid"); } - void onTearDown() override + void doTearDown() override { for (const auto& pathToRemove : dataPath) { diff --git a/Sofa/Component/IO/Mesh/tests/MeshGmshLoader_test.cpp b/Sofa/Component/IO/Mesh/tests/MeshGmshLoader_test.cpp index 43d1a17103a5..385347515148 100644 --- a/Sofa/Component/IO/Mesh/tests/MeshGmshLoader_test.cpp +++ b/Sofa/Component/IO/Mesh/tests/MeshGmshLoader_test.cpp @@ -51,7 +51,7 @@ namespace meshgmshloader_test /** * Constructor call for each test */ - void onSetUp() override {} + void doSetUp() override {} /** * Helper function to check mesh loading. diff --git a/Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp b/Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp index e4bb4b31a07a..8e59276c1e57 100644 --- a/Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp +++ b/Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp @@ -65,14 +65,14 @@ class STLExporter_test : public BaseSimulationTest { /// remove the file created... std::vector dataPath ; - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.StateContainer"); sofa::simpleapi::importPlugin("Sofa.Component.Visual"); sofa::simpleapi::importPlugin("Sofa.Component.IO.Mesh"); } - void onTearDown() override + void doTearDown() override { for (const auto& pathToRemove : dataPath) { diff --git a/Sofa/Component/IO/Mesh/tests/VisualModelOBJExporter_test.cpp b/Sofa/Component/IO/Mesh/tests/VisualModelOBJExporter_test.cpp index 5c0a6838eba9..eeb1810bcd0b 100644 --- a/Sofa/Component/IO/Mesh/tests/VisualModelOBJExporter_test.cpp +++ b/Sofa/Component/IO/Mesh/tests/VisualModelOBJExporter_test.cpp @@ -62,11 +62,11 @@ class VisualModelOBJExporter_test : public BaseSimulationTest { /// remove the file created... std::vector dataPath ; - void onSetUp() override + void doSetUp() override { } - void onTearDown() override + void doTearDown() override { for (const auto& pathToRemove : dataPath) { diff --git a/Sofa/Component/Mapping/Linear/tests/BarycentricMapping_test.cpp b/Sofa/Component/Mapping/Linear/tests/BarycentricMapping_test.cpp index a6423b462299..2f923ea9221a 100644 --- a/Sofa/Component/Mapping/Linear/tests/BarycentricMapping_test.cpp +++ b/Sofa/Component/Mapping/Linear/tests/BarycentricMapping_test.cpp @@ -74,7 +74,7 @@ struct BarycentricMapperTriangleSetTopologyTest : public BaseTest, public Baryc typename Out::VecCoord m_out; TriangleSetTopologyContainer::SPtr m_topology; - void onSetUp() override + void doSetUp() override { m_in.push_back(Vec3(0.5, 1.5, 0.0)); m_in.push_back(Vec3(1.5, 0.0, 2.5)); diff --git a/Sofa/Component/Mapping/NonLinear/tests/RigidMapping_test.cpp b/Sofa/Component/Mapping/NonLinear/tests/RigidMapping_test.cpp index c6478630e056..d18e3bbf6231 100644 --- a/Sofa/Component/Mapping/NonLinear/tests/RigidMapping_test.cpp +++ b/Sofa/Component/Mapping/NonLinear/tests/RigidMapping_test.cpp @@ -74,7 +74,7 @@ struct RigidMappingTest : public sofa::mapping_test::Mapping_test<_RigidMapping> typedef typename OutMechanicalObject::ReadVecCoord ReadOutVecCoord; typedef typename OutMechanicalObject::ReadVecDeriv ReadOutVecDeriv; - void onSetUp() override + void doSetUp() override { } diff --git a/Sofa/Component/Mapping/NonLinear/tests/SquareDistanceMapping_test.cpp b/Sofa/Component/Mapping/NonLinear/tests/SquareDistanceMapping_test.cpp index a837a54366fb..553a500b8c4a 100644 --- a/Sofa/Component/Mapping/NonLinear/tests/SquareDistanceMapping_test.cpp +++ b/Sofa/Component/Mapping/NonLinear/tests/SquareDistanceMapping_test.cpp @@ -150,7 +150,7 @@ struct SquareDistanceMappingCompare_test : NumericTest simulation::Node::SPtr oneMapping; simulation::Node::SPtr twoMappings; - void onSetUp() override + void doSetUp() override { root = simulation::getSimulation()->createNewNode("root"); diff --git a/Sofa/Component/Mass/tests/DiagonalMass_test.cpp b/Sofa/Component/Mass/tests/DiagonalMass_test.cpp index 6514b76a6c20..778b1577b2d8 100644 --- a/Sofa/Component/Mass/tests/DiagonalMass_test.cpp +++ b/Sofa/Component/Mass/tests/DiagonalMass_test.cpp @@ -96,7 +96,7 @@ class DiagonalMass_test : public BaseTest typename MechanicalObject::SPtr mstate; typename DiagonalMass::SPtr mass; - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.Topology.Container.Dynamic"); sofa::simpleapi::importPlugin("Sofa.Component.Topology.Container.Grid"); @@ -107,7 +107,7 @@ class DiagonalMass_test : public BaseTest root = simulation::getSimulation()->createNewGraph("root"); } - void onTearDown() override + void doTearDown() override { if (root!=nullptr) sofa::simulation::node::unload(root); diff --git a/Sofa/Component/Mass/tests/MeshMatrixMass_test.cpp b/Sofa/Component/Mass/tests/MeshMatrixMass_test.cpp index 49bed2351604..d49e3fa56bdc 100644 --- a/Sofa/Component/Mass/tests/MeshMatrixMass_test.cpp +++ b/Sofa/Component/Mass/tests/MeshMatrixMass_test.cpp @@ -99,7 +99,7 @@ class MeshMatrixMass_test : public BaseTest typename MechanicalObject::SPtr mstate; typename MeshMatrixMass::SPtr mass; - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.Topology.Container.Dynamic"); sofa::simpleapi::importPlugin("Sofa.Component.Topology.Container.Grid"); @@ -110,7 +110,7 @@ class MeshMatrixMass_test : public BaseTest root = simulation::getSimulation()->createNewGraph("root"); } - void onTearDown() override + void doTearDown() override { if (root!=nullptr) sofa::simulation::node::unload(root); diff --git a/Sofa/Component/Mass/tests/UniformMass_test.cpp b/Sofa/Component/Mass/tests/UniformMass_test.cpp index 7bda3be6560b..de926c6274a6 100644 --- a/Sofa/Component/Mass/tests/UniformMass_test.cpp +++ b/Sofa/Component/Mass/tests/UniformMass_test.cpp @@ -77,7 +77,7 @@ struct UniformMassTest : public BaseTest typename MechanicalObject::SPtr m_mecaobject; bool todo {true} ; - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.StateContainer"); sofa::simpleapi::importPlugin("Sofa.Component.Mass"); @@ -87,7 +87,7 @@ struct UniformMassTest : public BaseTest m_root = m_simu->createNewGraph("root"); } - void onTearDown() override + void doTearDown() override { if (m_root != nullptr){ sofa::simulation::node::unload(m_root); diff --git a/Sofa/Component/MechanicalLoad/tests/ConstantForceField_test.cpp b/Sofa/Component/MechanicalLoad/tests/ConstantForceField_test.cpp index 43e926947fbd..e4d77cea95ed 100644 --- a/Sofa/Component/MechanicalLoad/tests/ConstantForceField_test.cpp +++ b/Sofa/Component/MechanicalLoad/tests/ConstantForceField_test.cpp @@ -72,7 +72,7 @@ struct ConstantForceField_test : public BaseSimulationTest, NumericTest TheMechanicalObject; using Real = typename DataTypes::Coord::value_type; - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.ODESolver"); sofa::simpleapi::importPlugin("Sofa.Component.StateContainer"); @@ -81,7 +81,7 @@ struct ConstantForceField_test : public BaseSimulationTest, NumericTest /// Create the context for the scene - void onSetUp() override + void doSetUp() override { // Init simulation simulation = sofa::simulation::getSimulation(); diff --git a/Sofa/Component/ODESolver/Backward/tests/StaticSolver_test.cpp b/Sofa/Component/ODESolver/Backward/tests/StaticSolver_test.cpp index 510b11bf89a1..92150518e517 100644 --- a/Sofa/Component/ODESolver/Backward/tests/StaticSolver_test.cpp +++ b/Sofa/Component/ODESolver/Backward/tests/StaticSolver_test.cpp @@ -51,7 +51,7 @@ static constexpr SReal l = youngModulus * poissonRatio / ((1.0 + poissonRatio) * class StaticSolverTest : public sofa::testing::BaseTest { public: - void onSetUp() override { + void doSetUp() override { root = getSimulation()->createNewNode("root"); @@ -83,7 +83,7 @@ class StaticSolverTest : public sofa::testing::BaseTest solver = dynamic_cast (s.get()); } - void onTearDown() override { + void doTearDown() override { sofa::simulation::node::unload(root); } diff --git a/Sofa/Component/Playback/tests/WriteState_test.cpp b/Sofa/Component/Playback/tests/WriteState_test.cpp index b85ceb306672..d0b92f7f4e8e 100644 --- a/Sofa/Component/Playback/tests/WriteState_test.cpp +++ b/Sofa/Component/Playback/tests/WriteState_test.cpp @@ -71,7 +71,7 @@ namespace sofa { double final_expected_value=0.0; /// Create the context for the scene - void onSetUp() override + void doSetUp() override { // Init simulation root = simulation::getSimulation()->createNewGraph("root"); @@ -220,7 +220,7 @@ namespace sofa { /// Unload the scene - void onTearDown() override + void doTearDown() override { if (root!=nullptr) sofa::simulation::node::unload(root); diff --git a/Sofa/Component/SceneUtility/tests/AddResourceRepository_test.cpp b/Sofa/Component/SceneUtility/tests/AddResourceRepository_test.cpp index cfd3a91f42e9..ffc5d89d7e03 100644 --- a/Sofa/Component/SceneUtility/tests/AddResourceRepository_test.cpp +++ b/Sofa/Component/SceneUtility/tests/AddResourceRepository_test.cpp @@ -44,7 +44,7 @@ struct AddResourceRepository_test : public BaseSimulationTest sofa::simulation::Node::SPtr m_root; std::string m_testRepoDir; - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component.SceneUtility"); diff --git a/Sofa/Component/SolidMechanics/FEM/Elastic/tests/BaseTetrahedronFEMForceField_test.h b/Sofa/Component/SolidMechanics/FEM/Elastic/tests/BaseTetrahedronFEMForceField_test.h index c53a8b2ef36f..ea5de7b9cb67 100644 --- a/Sofa/Component/SolidMechanics/FEM/Elastic/tests/BaseTetrahedronFEMForceField_test.h +++ b/Sofa/Component/SolidMechanics/FEM/Elastic/tests/BaseTetrahedronFEMForceField_test.h @@ -64,12 +64,12 @@ class BaseTetrahedronFEMForceField_test : public sofa::testing::BaseTest public: - void onSetUp() override + void doSetUp() override { m_simulation = sofa::simulation::getSimulation(); } - void onTearDown() override + void doTearDown() override { if (m_root != nullptr) sofa::simulation::node::unload(m_root); diff --git a/Sofa/Component/SolidMechanics/FEM/Elastic/tests/BeamFEMForceField_test.cpp b/Sofa/Component/SolidMechanics/FEM/Elastic/tests/BeamFEMForceField_test.cpp index 7e262f065df7..3d94a27f88fc 100644 --- a/Sofa/Component/SolidMechanics/FEM/Elastic/tests/BeamFEMForceField_test.cpp +++ b/Sofa/Component/SolidMechanics/FEM/Elastic/tests/BeamFEMForceField_test.cpp @@ -66,13 +66,13 @@ class BeamFEMForceField_test : public BaseTest public: - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component"); m_simulation = sofa::simulation::getSimulation(); } - void onTearDown() override + void doTearDown() override { if (m_root != nullptr) sofa::simulation::node::unload(m_root); diff --git a/Sofa/Component/SolidMechanics/FEM/Elastic/tests/TriangleFEMForceField_test.cpp b/Sofa/Component/SolidMechanics/FEM/Elastic/tests/TriangleFEMForceField_test.cpp index 2b8f62b2ae11..9c9f7c901db1 100644 --- a/Sofa/Component/SolidMechanics/FEM/Elastic/tests/TriangleFEMForceField_test.cpp +++ b/Sofa/Component/SolidMechanics/FEM/Elastic/tests/TriangleFEMForceField_test.cpp @@ -79,12 +79,12 @@ class TriangleFEMForceField_test : public BaseTest public: - void onSetUp() override + void doSetUp() override { m_simulation = sofa::simulation::getSimulation(); } - void onTearDown() override + void doTearDown() override { if (m_root != nullptr) sofa::simulation::node::unload(m_root); diff --git a/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/TetrahedronHyperelasticityFEMForceField_params_test.cpp b/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/TetrahedronHyperelasticityFEMForceField_params_test.cpp index 9a13344ffbb2..055fb1a92799 100644 --- a/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/TetrahedronHyperelasticityFEMForceField_params_test.cpp +++ b/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/TetrahedronHyperelasticityFEMForceField_params_test.cpp @@ -74,7 +74,7 @@ struct TetrahedronHyperelasticityFEMForceField_params_test : public BaseSimulati unsigned char flags; ///< testing options. (all by default). To be used with precaution. /// } - void onSetUp() override + void doSetUp() override { } diff --git a/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/TetrahedronHyperelasticityFEMForceField_scene_test.cpp b/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/TetrahedronHyperelasticityFEMForceField_scene_test.cpp index 246786289054..5fa2c6b37e24 100644 --- a/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/TetrahedronHyperelasticityFEMForceField_scene_test.cpp +++ b/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/TetrahedronHyperelasticityFEMForceField_scene_test.cpp @@ -74,7 +74,7 @@ struct TetrahedronHyperelasticityFEMForceField_scene_test : public BaseSimulatio unsigned char flags; ///< testing options. (all by default). To be used with precaution. /// } - void onSetUp() override + void doSetUp() override { } diff --git a/Sofa/Component/SolidMechanics/Spring/tests/TriangularBendingSprings_test.cpp b/Sofa/Component/SolidMechanics/Spring/tests/TriangularBendingSprings_test.cpp index 2f0c237244ee..083fa1388cad 100644 --- a/Sofa/Component/SolidMechanics/Spring/tests/TriangularBendingSprings_test.cpp +++ b/Sofa/Component/SolidMechanics/Spring/tests/TriangularBendingSprings_test.cpp @@ -67,14 +67,14 @@ class TriangularBendingSprings_test : public BaseTest public: - void onSetUp() override + void doSetUp() override { m_simulation = sofa::simulation::getSimulation(); sofa::simpleapi::importPlugin("Sofa.Component.Topology.Container.Dynamic"); sofa::simpleapi::importPlugin("Sofa.Component.Topology.Container.Grid"); } - void onTearDown() override + void doTearDown() override { if (m_root != nullptr) sofa::simulation::node::unload(m_root); diff --git a/Sofa/Component/SolidMechanics/simutests/AffinePatch_test.cpp b/Sofa/Component/SolidMechanics/simutests/AffinePatch_test.cpp index e9ef9f74761a..baa7a16efde4 100644 --- a/Sofa/Component/SolidMechanics/simutests/AffinePatch_test.cpp +++ b/Sofa/Component/SolidMechanics/simutests/AffinePatch_test.cpp @@ -80,7 +80,7 @@ struct AffinePatch_sofa_test : public sofa::testing::BaseSimulationTest, sofa::t Coord testedTranslation; /// Create the context for the scene - void onSetUp() override + void doSetUp() override { // Init simulation simulation = sofa::simulation::getSimulation(); diff --git a/Sofa/Component/SolidMechanics/simutests/LinearElasticity_test.cpp b/Sofa/Component/SolidMechanics/simutests/LinearElasticity_test.cpp index 75391f7eb91e..3db4e9cc08c0 100644 --- a/Sofa/Component/SolidMechanics/simutests/LinearElasticity_test.cpp +++ b/Sofa/Component/SolidMechanics/simutests/LinearElasticity_test.cpp @@ -196,7 +196,7 @@ struct LinearElasticity_test : public sofa::testing::BaseSimulationTest, sofa::t // Create the context for the scene - void onSetUp() override + void doSetUp() override { // Init simulation simulation = sofa::simulation::getSimulation(); @@ -281,7 +281,7 @@ struct LinearElasticity_test : public sofa::testing::BaseSimulationTest, sofa::t } return true; } - void onTearDown() override + void doTearDown() override { if (tractionStruct.root!=nullptr) sofa::simulation::node::unload(tractionStruct.root); diff --git a/Sofa/Component/Topology/Container/Dynamic/tests/TetrahedronNumericalIntegration_test.cpp b/Sofa/Component/Topology/Container/Dynamic/tests/TetrahedronNumericalIntegration_test.cpp index 1ea6251c3bbe..c172e8c740e5 100644 --- a/Sofa/Component/Topology/Container/Dynamic/tests/TetrahedronNumericalIntegration_test.cpp +++ b/Sofa/Component/Topology/Container/Dynamic/tests/TetrahedronNumericalIntegration_test.cpp @@ -63,7 +63,7 @@ struct TetrahedronNumericalIntegration_test : public NumericTest::SPtr geo; // Create the context for the scene - void onSetUp() override + void doSetUp() override { // Init simulation simulation = sofa::simulation::getSimulation(); @@ -135,7 +135,7 @@ struct TetrahedronNumericalIntegration_test : public NumericTest::SPtr geo; // Create the context for the scene - void onSetUp() override + void doSetUp() override { // Init simulation simulation = sofa::simulation::getSimulation(); @@ -135,7 +135,7 @@ struct TriangleNumericalIntegration_test : public NumericTest(); diff --git a/Sofa/framework/Core/test/TrackedData_test.cpp b/Sofa/framework/Core/test/TrackedData_test.cpp index 929de3fe1687..91ecdca13e80 100644 --- a/Sofa/framework/Core/test/TrackedData_test.cpp +++ b/Sofa/framework/Core/test/TrackedData_test.cpp @@ -215,7 +215,7 @@ struct DataTrackerEngine_test: public BaseTest static unsigned updateCounter; core::DataTrackerCallback dataTracker; - void onSetUp() override + void doSetUp() override { updateCounter = 0; } diff --git a/Sofa/framework/Core/test/objectmodel/BaseObjectDescription_test.cpp b/Sofa/framework/Core/test/objectmodel/BaseObjectDescription_test.cpp index 7834db530783..ba7c858d2383 100644 --- a/Sofa/framework/Core/test/objectmodel/BaseObjectDescription_test.cpp +++ b/Sofa/framework/Core/test/objectmodel/BaseObjectDescription_test.cpp @@ -29,11 +29,11 @@ using sofa::testing::BaseTest ; struct BaseObjectDescription_test: public BaseTest { - void onSetUp() override + void doSetUp() override { } - void onTearDown() override + void doTearDown() override { } diff --git a/Sofa/framework/Core/test/objectmodel/DataFileName_test.cpp b/Sofa/framework/Core/test/objectmodel/DataFileName_test.cpp index 6192b65834f1..f37aa678b249 100644 --- a/Sofa/framework/Core/test/objectmodel/DataFileName_test.cpp +++ b/Sofa/framework/Core/test/objectmodel/DataFileName_test.cpp @@ -43,7 +43,7 @@ class DataFileName_test: public BaseTest { DataFileName d_filename; public: - void onSetUp() override + void doSetUp() override { DataRepository.addFirstPath( SOFA_TESTING_RESOURCES_DIR ); } diff --git a/Sofa/framework/Core/test/objectmodel/DataLink_test.cpp b/Sofa/framework/Core/test/objectmodel/DataLink_test.cpp index b2c3f9be5a6e..f6b020030bfb 100644 --- a/Sofa/framework/Core/test/objectmodel/DataLink_test.cpp +++ b/Sofa/framework/Core/test/objectmodel/DataLink_test.cpp @@ -40,7 +40,7 @@ struct DataLink_test: public BaseTest Data dataVec3f; Data dataVec3d; - void onSetUp() override + void doSetUp() override { /// Setup the data and create a link between the two data data1.setName("data1"); @@ -50,7 +50,7 @@ struct DataLink_test: public BaseTest data2.setName("dataVec3d"); } - void onTearDown() override + void doTearDown() override { data1.unset(); data2.unset(); diff --git a/Sofa/framework/Core/test/objectmodel/SingleLink_test.cpp b/Sofa/framework/Core/test/objectmodel/SingleLink_test.cpp index 7588582da308..7ad36dabcd04 100644 --- a/Sofa/framework/Core/test/objectmodel/SingleLink_test.cpp +++ b/Sofa/framework/Core/test/objectmodel/SingleLink_test.cpp @@ -47,7 +47,7 @@ class SingleLink_test: public BaseTest BaseObject::SPtr m_src ; /// Create a link to an object. - void onSetUp() override + void doSetUp() override { m_dst = sofa::core::objectmodel::New() ; m_src = sofa::core::objectmodel::New() ; diff --git a/Sofa/framework/Helper/simutest/AdvancedTimer_test.cpp b/Sofa/framework/Helper/simutest/AdvancedTimer_test.cpp index a92b74404512..a7dc021fb535 100644 --- a/Sofa/framework/Helper/simutest/AdvancedTimer_test.cpp +++ b/Sofa/framework/Helper/simutest/AdvancedTimer_test.cpp @@ -40,7 +40,7 @@ namespace sofa { struct AdvancedTimerTest: public BaseSimulationTest { protected: - void onSetUp() override + void doSetUp() override { using namespace sofa::helper; diff --git a/Sofa/framework/Helper/test/io/MeshOBJ_test.cpp b/Sofa/framework/Helper/test/io/MeshOBJ_test.cpp index bcde7e8d0776..b673a6e933f6 100644 --- a/Sofa/framework/Helper/test/io/MeshOBJ_test.cpp +++ b/Sofa/framework/Helper/test/io/MeshOBJ_test.cpp @@ -32,11 +32,11 @@ namespace sofa { class MeshOBJ_test : public BaseTest { protected: - void onSetUp() override + void doSetUp() override { sofa::helper::system::DataRepository.addFirstPath(SOFA_TESTING_RESOURCES_DIR); } - void onTearDown() override + void doTearDown() override { sofa::helper::system::DataRepository.removePath(SOFA_TESTING_RESOURCES_DIR); } diff --git a/Sofa/framework/Helper/test/io/STBImage_test.cpp b/Sofa/framework/Helper/test/io/STBImage_test.cpp index 20b086da8dbc..cd05d8dbc991 100644 --- a/Sofa/framework/Helper/test/io/STBImage_test.cpp +++ b/Sofa/framework/Helper/test/io/STBImage_test.cpp @@ -43,11 +43,11 @@ class STBImage_test : public BaseTest } - void onSetUp() override + void doSetUp() override { sofa::helper::system::DataRepository.addFirstPath(STBIMAGETEST_RESOURCES_DIR); } - void onTearDown() override + void doTearDown() override { sofa::helper::system::DataRepository.removePath(STBIMAGETEST_RESOURCES_DIR); } diff --git a/Sofa/framework/Helper/test/io/XspLoader_test.cpp b/Sofa/framework/Helper/test/io/XspLoader_test.cpp index f5e116939133..eb3acc1574c7 100644 --- a/Sofa/framework/Helper/test/io/XspLoader_test.cpp +++ b/Sofa/framework/Helper/test/io/XspLoader_test.cpp @@ -85,11 +85,11 @@ class XspLoader_test : public BaseTest } }; - void onSetUp() override + void doSetUp() override { sofa::helper::system::DataRepository.addFirstPath(SOFA_TESTING_RESOURCES_DIR); } - void onTearDown() override + void doTearDown() override { sofa::helper::system::DataRepository.removePath(SOFA_TESTING_RESOURCES_DIR); } diff --git a/Sofa/framework/Helper/test/system/PluginManager_test.cpp b/Sofa/framework/Helper/test/system/PluginManager_test.cpp index bc0f5f9c8aee..7d9ebf95dad7 100644 --- a/Sofa/framework/Helper/test/system/PluginManager_test.cpp +++ b/Sofa/framework/Helper/test/system/PluginManager_test.cpp @@ -64,7 +64,7 @@ struct PluginManager_test: public BaseTest // This list of paths will be deleted when cleaning-up the test sofa::type::vector createdFilesToDelete; - void onSetUp() override + void doSetUp() override { // Set pluginDir by searching pluginFileName in the PluginRepository for ( std::string path : sofa::helper::system::PluginRepository.getPaths() ) @@ -83,7 +83,7 @@ struct PluginManager_test: public BaseTest << std::endl; } - void onTearDown() override + void doTearDown() override { for (const auto& file : createdFilesToDelete) { diff --git a/Sofa/framework/LinearAlgebra/Testing/src/Sofa.LinearAlgebra.Testing/BaseMatrix_test.h b/Sofa/framework/LinearAlgebra/Testing/src/Sofa.LinearAlgebra.Testing/BaseMatrix_test.h index c092397e04d8..4767da3fe64e 100644 --- a/Sofa/framework/LinearAlgebra/Testing/src/Sofa.LinearAlgebra.Testing/BaseMatrix_test.h +++ b/Sofa/framework/LinearAlgebra/Testing/src/Sofa.LinearAlgebra.Testing/BaseMatrix_test.h @@ -47,7 +47,7 @@ class TestBaseMatrix : public sofa::testing::NumericTest static constexpr sofa::Index NbRows = T::NbRows; static constexpr sofa::Index NbCols = T::NbCols; - void onSetUp() override + void doSetUp() override { m_testedMatrix = std::make_unique(); m_testedMatrix->resize(NbRows, NbCols); @@ -55,7 +55,7 @@ class TestBaseMatrix : public sofa::testing::NumericTest m_modelMatrix.clear(); } - void onTearDown() override + void doTearDown() override { m_testedMatrix.reset(); } diff --git a/Sofa/framework/Simulation/Graph/test/MutationListener_test.cpp b/Sofa/framework/Simulation/Graph/test/MutationListener_test.cpp index c88365425127..c2d20e7bc9c2 100644 --- a/Sofa/framework/Simulation/Graph/test/MutationListener_test.cpp +++ b/Sofa/framework/Simulation/Graph/test/MutationListener_test.cpp @@ -411,14 +411,14 @@ struct MutationListener_test : public BaseTest listener.log); } - void onSetUp() override + void doSetUp() override { sofa::simulation::Simulation* simu = sofa::simulation::getSimulation(); root = simu->createNewGraph("root"); root->addListener(&listener); } - void onTearDown() override + void doTearDown() override { } }; diff --git a/Sofa/framework/Testing/src/sofa/testing/BaseTest.cpp b/Sofa/framework/Testing/src/sofa/testing/BaseTest.cpp index 474fa830b5ce..f4c6de7a2631 100644 --- a/Sofa/framework/Testing/src/sofa/testing/BaseTest.cpp +++ b/Sofa/framework/Testing/src/sofa/testing/BaseTest.cpp @@ -101,13 +101,13 @@ void BaseTest::loadPlugins( void BaseTest::SetUp() { - onSetUp(); + doSetUp(); } void BaseTest::TearDown() { m_loadedPlugins.clear(); - onTearDown(); + doTearDown(); } diff --git a/Sofa/framework/Testing/src/sofa/testing/BaseTest.h b/Sofa/framework/Testing/src/sofa/testing/BaseTest.h index c42cdedfb0e1..e8467ae12f77 100644 --- a/Sofa/framework/Testing/src/sofa/testing/BaseTest.h +++ b/Sofa/framework/Testing/src/sofa/testing/BaseTest.h @@ -47,7 +47,13 @@ class SOFA_TESTING_API BaseTest : public ::testing::Test BaseTest() ; ~BaseTest() override; + virtual void doSetUp() {} + virtual void doTearDown() {} + + SOFA_ATTRIBUTE_DEPRECATED__TESTING_ONSETUP() virtual void onSetUp() {} + + SOFA_ATTRIBUTE_DEPRECATED__TESTING_ONTEARDOWN() virtual void onTearDown() {} /// Seed value diff --git a/Sofa/framework/Testing/src/sofa/testing/config.h.in b/Sofa/framework/Testing/src/sofa/testing/config.h.in index 35221eb58fea..04dedf7c8fba 100644 --- a/Sofa/framework/Testing/src/sofa/testing/config.h.in +++ b/Sofa/framework/Testing/src/sofa/testing/config.h.in @@ -43,3 +43,20 @@ constexpr char SOFA_TESTING_RESOURCES_DIR[] = "@SOFA_TESTING_RESOURCES_DIR@"; SOFA_ATTRIBUTE_DEPRECATED( \ "v24.06", "v24.12", "Use sofa::simpleapi::importPlugin() instead.") #endif // SOFA_BUILD_SOFA_TESTING + + +#ifdef SOFA_BUILD_SOFA_TESTING +#define SOFA_ATTRIBUTE_DEPRECATED__TESTING_ONSETUP() +#else +#define SOFA_ATTRIBUTE_DEPRECATED__TESTING_ONSETUP() \ + SOFA_ATTRIBUTE_DEPRECATED( \ + "v25.06", "v25.12", "Use doSetUp instead.") +#endif // SOFA_BUILD_SOFA_TESTING + +#ifdef SOFA_BUILD_SOFA_TESTING +#define SOFA_ATTRIBUTE_DEPRECATED__TESTING_ONTEARDOWN() +#else +#define SOFA_ATTRIBUTE_DEPRECATED__TESTING_ONTEARDOWN() \ + SOFA_ATTRIBUTE_DEPRECATED( \ + "v25.06", "v25.12", "Use doTearDown instead.") +#endif // SOFA_BUILD_SOFA_TESTING diff --git a/Sofa/framework/Type/test/MatSym_test.cpp b/Sofa/framework/Type/test/MatSym_test.cpp index f91f864460a2..6e7926f3766d 100644 --- a/Sofa/framework/Type/test/MatSym_test.cpp +++ b/Sofa/framework/Type/test/MatSym_test.cpp @@ -43,7 +43,7 @@ class MatSymTest : public testing::NumericTest using Real = typename ParameterPack::Real; static constexpr auto Size = ParameterPack::Size; - void onSetUp() override + void doSetUp() override { sofa::testing::LinearCongruentialRandomGenerator lcg(96547); diff --git a/applications/plugins/CImgPlugin/CImgPlugin_test/ImageCImg_test.cpp b/applications/plugins/CImgPlugin/CImgPlugin_test/ImageCImg_test.cpp index 736488280240..20b2be44f5a0 100644 --- a/applications/plugins/CImgPlugin/CImgPlugin_test/ImageCImg_test.cpp +++ b/applications/plugins/CImgPlugin/CImgPlugin_test/ImageCImg_test.cpp @@ -42,11 +42,11 @@ class ImageCImg_test : public BaseTest } - void onSetUp() override + void doSetUp() override { sofa::helper::system::DataRepository.addFirstPath(CIMGPLUGIN_RESOURCES_DIR); } - void onTearDown() override + void doTearDown() override { sofa::helper::system::DataRepository.removePath(CIMGPLUGIN_RESOURCES_DIR); } diff --git a/applications/plugins/SceneCreator/SceneCreator_test/SceneCreator_test.cpp b/applications/plugins/SceneCreator/SceneCreator_test/SceneCreator_test.cpp index 8195a5f4dddd..9e11ed89c0fd 100644 --- a/applications/plugins/SceneCreator/SceneCreator_test/SceneCreator_test.cpp +++ b/applications/plugins/SceneCreator/SceneCreator_test/SceneCreator_test.cpp @@ -58,7 +58,7 @@ using sofa::simulation::Node; class SceneCreator_test : public BaseSimulationTest { public: - void onSetUp() override + void doSetUp() override { sofa::simpleapi::importPlugin("Sofa.Component"); sofa::simpleapi::importPlugin("Sofa.GL.Component.Rendering3D"); diff --git a/applications/plugins/image/image_test/DataImage_test.cpp b/applications/plugins/image/image_test/DataImage_test.cpp index bce32290701a..ce749b58a7d7 100644 --- a/applications/plugins/image/image_test/DataImage_test.cpp +++ b/applications/plugins/image/image_test/DataImage_test.cpp @@ -45,7 +45,7 @@ struct DataImageLink_test : public sofa::testing::BaseTest core::objectmodel::Data< defaulttype::Image > data2; /// Create a link between the two images - void onSetUp() + void doSetUp() { } diff --git a/applications/plugins/image/image_test/ImageEngine_test.cpp b/applications/plugins/image/image_test/ImageEngine_test.cpp index b561260f5973..dcae5fee3d9e 100644 --- a/applications/plugins/image/image_test/ImageEngine_test.cpp +++ b/applications/plugins/image/image_test/ImageEngine_test.cpp @@ -51,7 +51,7 @@ struct ImageEngine_test : public sofa::testing::BaseTest simulation::Node::SPtr root; // Unload scene - void onTearDown() + void doTearDown() { if (root!=NULL) sofa::simulation::node::unload(root); diff --git a/applications/projects/SceneChecking/tests/SceneChecker_test.cpp b/applications/projects/SceneChecking/tests/SceneChecker_test.cpp index 9f420b0105b5..f6cdc5ae03c8 100644 --- a/applications/projects/SceneChecking/tests/SceneChecker_test.cpp +++ b/applications/projects/SceneChecking/tests/SceneChecker_test.cpp @@ -76,7 +76,7 @@ int ComponentDeprecatedClassId = sofa::core::RegisterObject("") //////////////////////////////////////////////////////////////////////////////////////////////////// struct SceneChecker_test : public BaseSimulationTest { - void onSetUp() override + void doSetUp() override { } diff --git a/applications/projects/runSofa/runSofa_test/runSofa_test.cpp b/applications/projects/runSofa/runSofa_test/runSofa_test.cpp index 346ec776c9b2..7d0607e198e2 100644 --- a/applications/projects/runSofa/runSofa_test/runSofa_test.cpp +++ b/applications/projects/runSofa/runSofa_test/runSofa_test.cpp @@ -44,7 +44,7 @@ class runSofa_test : public sofa::testing::BaseTest } - void onSetUp() override + void doSetUp() override { const std::string& pluginDir = PluginRepository.getFirstPath(); @@ -58,7 +58,7 @@ class runSofa_test : public sofa::testing::BaseTest testPluginList << m_testPluginName << std::endl; testPluginList.close(); } - void onTearDown() override + void doTearDown() override { }