diff --git a/test/pitytest11/src/PitySwarm.cc b/test/pitytest11/src/PitySwarm.cc index 2752d85..a9ee1e6 100644 --- a/test/pitytest11/src/PitySwarm.cc +++ b/test/pitytest11/src/PitySwarm.cc @@ -68,16 +68,17 @@ namespace pEp { } } - void PitySwarm::addTestUnit( + PityUnit* PitySwarm::addTestUnit( int nodeNr, const std::string& name, PityUnit::TestFunction test_func) { - auto tmp = std::make_shared>( + std::shared_ptr> tmp = std::make_shared>( _nodeUnits.at(nodeNr).get(), name, test_func); _testUnits.push_back(tmp); + return tmp.get(); } void PitySwarm::run() diff --git a/test/pitytest11/src/PitySwarm.hh b/test/pitytest11/src/PitySwarm.hh index 8714d65..3f1c23c 100644 --- a/test/pitytest11/src/PitySwarm.hh +++ b/test/pitytest11/src/PitySwarm.hh @@ -19,7 +19,7 @@ namespace pEp { // Constructors PitySwarm(PityModel& model); - void addTestUnit( + PityUnit* addTestUnit( int nodeNr, const std::string& name, PityUnit::TestFunction test_func);