Skip to content

Commit

Permalink
Add optional exception on plugin loading to JTest
Browse files Browse the repository at this point in the history
This lets us write integration tests for the plugin loader
  • Loading branch information
nathanwbrei committed Aug 12, 2024
1 parent 403b81f commit 629ca91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/JTest/JTestMain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ void InitPlugin(JApplication *app){
app->Add(new JFactoryGeneratorT<JTestDisentangler>());
app->Add(new JFactoryGeneratorT<JTestTracker>());

bool except_on_loading = app->RegisterParameter("jtest:except_on_loading", false);
if (except_on_loading) {
throw JException("Planned exception on loading!");
}

bool write_csv = false;
app->SetDefaultParameter("jtest:write_csv", write_csv);
if (write_csv) {
Expand Down

0 comments on commit 629ca91

Please sign in to comment.