Skip to content

Commit

Permalink
expect a warning when loading pluginA
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Dec 10, 2024
1 parent 4338187 commit d7e32f6
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Sofa/framework/Helper/test/system/PluginManager_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,22 @@ TEST_F(PluginManager_test, loadTestPluginAByPath)
/// Check that existing plugins are correctly handled and returns no
/// error/warning message.
{
EXPECT_MSG_NOEMIT(Warning, Error);

EXPECT_MSG_NOEMIT(Error, Warning);
std::cout << "PluginManager_test.loadTestPluginAByPath: "
<< "pm.getPluginMap().size() = " << pm.getPluginMap().size()
<< std::endl;
<< "pm.getPluginMap().size() = " << pm.getPluginMap().size()
<< std::endl;
}
{
EXPECT_MSG_NOEMIT(Error);
// Plugin A still uses the deprecated registration mechanism
// and is expected to throw a warning when loaded
EXPECT_MSG_EMIT(Warning);

ASSERT_EQ(pm.loadPluginByPath(pluginPath), PluginManager::PluginLoadStatus::SUCCESS);
}
{
EXPECT_MSG_NOEMIT(Error, Warning);
ASSERT_GT(pm.findPlugin(pluginAName).size(), 0u);
}

Expand Down

0 comments on commit d7e32f6

Please sign in to comment.