Skip to content

Commit

Permalink
support multiple calls to loadPlugins
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger authored and fredroy committed Dec 20, 2024
1 parent a33b55b commit b45f801
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sofa/framework/Testing/src/sofa/testing/BaseTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ BaseTest::~BaseTest() {}
void BaseTest::loadPlugins(
const std::initializer_list<std::string>& pluginNames)
{
m_loadedPlugins = makeScopedPlugin(pluginNames);
m_loadedPlugins.emplace_back(pluginNames.begin(), pluginNames.end());
}

void BaseTest::SetUp()
Expand All @@ -106,7 +106,7 @@ void BaseTest::SetUp()

void BaseTest::TearDown()
{
m_loadedPlugins.reset();
m_loadedPlugins.clear();
onTearDown();
}

Expand Down
3 changes: 2 additions & 1 deletion Sofa/framework/Testing/src/sofa/testing/BaseTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
******************************************************************************/
#pragma once

#include <deque>
#include <sofa/testing/config.h>

#include <gtest/gtest.h>
Expand Down Expand Up @@ -58,7 +59,7 @@ class SOFA_TESTING_API BaseTest : public ::testing::Test
void SetUp() override ;
void TearDown() override ;

std::unique_ptr<sofa::testing::ScopedPlugin> m_loadedPlugins;
std::deque<sofa::testing::ScopedPlugin> m_loadedPlugins;
};

} // namespace sofa::testing

0 comments on commit b45f801

Please sign in to comment.