Browse Source

Test: PityTest - PityUnit add copy assign operator

LIB-11
heck 11 months ago
parent
commit
a2c5b542f2
2 changed files with 14 additions and 1 deletions
  1. +6
    -1
      test/pitytest11/src/PityUnit.hh
  2. +8
    -0
      test/pitytest11/src/PityUnit.hxx

+ 6
- 1
test/pitytest11/src/PityUnit.hh View File

@ -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
- 0
test/pitytest11/src/PityUnit.hxx View File

@ -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