Browse Source

Tests: PitySwarm - addTestUnit() returns the unit

master
heck 4 years ago
parent
commit
237ab988dd
  1. 5
      src/PitySwarm.cc
  2. 2
      src/PitySwarm.hh

5
src/PitySwarm.cc

@ -68,16 +68,17 @@ namespace pEp {
}
}
void PitySwarm::addTestUnit(
PityUnit<PityPerspective>* PitySwarm::addTestUnit(
int nodeNr,
const std::string& name,
PityUnit<PityPerspective>::TestFunction test_func)
{
auto tmp = std::make_shared<PityUnit<PityPerspective>>(
std::shared_ptr<PityUnit<PityPerspective>> tmp = std::make_shared<PityUnit<PityPerspective>>(
_nodeUnits.at(nodeNr).get(),
name,
test_func);
_testUnits.push_back(tmp);
return tmp.get();
}
void PitySwarm::run()

2
src/PitySwarm.hh

@ -19,7 +19,7 @@ namespace pEp {
// Constructors
PitySwarm(PityModel& model);
void addTestUnit(
PityUnit<PityPerspective>* addTestUnit(
int nodeNr,
const std::string& name,
PityUnit<PityPerspective>::TestFunction test_func);

Loading…
Cancel
Save