From 7f837a712067a03654ce07c57b712443b23893da Mon Sep 17 00:00:00 2001 From: heck Date: Wed, 16 Jun 2021 16:39:31 +0200 Subject: [PATCH] Tests: PitySwarm - addTestUnit() returns the unit --- test/pitytest11/src/PitySwarm.cc | 5 +++-- test/pitytest11/src/PitySwarm.hh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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);