Browse Source

Test: PityTest - PityUnit add copy assign operator

LIB-11
heck 4 years ago
parent
commit
a2c5b542f2
  1. 7
      test/pitytest11/src/PityUnit.hh
  2. 8
      test/pitytest11/src/PityUnit.hxx

7
test/pitytest11/src/PityUnit.hh

@ -25,7 +25,7 @@ namespace pEp {
// * returns 0
using TestFunction = std::function<int(PityUnit<TestContext>&, TestContext*)>;
// Constructors are private
// Constructors
PityUnit() = delete;
explicit PityUnit<TestContext>(
const std::string& name,
@ -41,6 +41,11 @@ namespace pEp {
ExecutionMode exec_mode = ExecutionMode::FUNCTION);
PityUnit<TestContext>(const PityUnit<TestContext> &rhs);
// copy-assign
PityUnit<TestContext>& operator=(const PityUnit<TestContext>& rhs);
// clone
PityUnit<TestContext> *clone() override;
// Read-Only

8
test/pitytest11/src/PityUnit.hxx

@ -54,6 +54,14 @@ namespace pEp {
_test_func = rhs._test_func;
}
template<class TestContext>
PityUnit<TestContext> &PityUnit<TestContext>::operator=(const PityUnit<TestContext> &rhs)
{
_perspective = rhs._perspective;
_test_func = rhs._test_func;
return *this;
}
template<class TestContext>
PityUnit<TestContext> *PityUnit<TestContext>::clone()
{

Loading…
Cancel
Save