Browse Source

Test: PityTest - Units return int

LIB-11
heck 4 years ago
parent
commit
87ed5be3d0
  1. 5
      test/pitytest11/src/PityUnit.hh
  2. 13
      test/pitytest11/src/PityUnit.hxx

5
test/pitytest11/src/PityUnit.hh

@ -22,7 +22,10 @@ namespace pEp {
template<class TestContext = void>
class PityUnit {
public:
using TestFunction = const std::function<void(PityUnit<TestContext>&, TestContext*)>;
// Test success if TestFunction:
// * does not throw
// * returns 0
using TestFunction = const std::function<int(PityUnit<TestContext>&, TestContext*)>;
enum class ExecutionMode
{
FUNCTION,

13
test/pitytest11/src/PityUnit.hxx

@ -142,12 +142,6 @@ namespace pEp {
}
}
// template<class TestContext>
// void PityUnit<TestContext>::setExecutionMode(ExecutionMode mode)
// {
// _exec_mode = mode;
// }
// static
template<class TestContext>
void PityUnit<TestContext>::setGlobalRootDir(const std::string &dir)
@ -166,9 +160,11 @@ namespace pEp {
void PityUnit<TestContext>::run()
{
pEpLogClass("called");
_log_mutex = std::make_shared<fs_mutex>("fds");
_log_mutex = std::make_shared<fs_mutex>("log.mutex");
_log_mutex->release();
setenv("HOME", processDir().c_str(), true);
if (_isRootUnit()) {
_init();
}
@ -320,7 +316,6 @@ namespace pEp {
logH3("INIT DONE");
}
template<class TestContext>
void PityUnit<TestContext>::_run()
{
@ -442,7 +437,6 @@ namespace pEp {
}
}
// Inherited (if null see parent recursively)
template<class TestContext>
TestContext *PityUnit<TestContext>::getPerspective() const
@ -508,7 +502,6 @@ namespace pEp {
return ret;
}
template<class TestContext>
Utils::Color PityUnit<TestContext>::_colForProcUnitNr(int procUnitNr) const
{

Loading…
Cancel
Save