Skip to content

Commit 70296d7

Browse files
committed
refactor: remove default destructor and add deleted copy constructor and assignment operator in TestExecutionImpl
1 parent 65c906c commit 70296d7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cucumber_cpp/library/engine/FailureHandler.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ namespace cucumber_cpp::library::engine
1313
{
1414
virtual ~TestAssertionHandler() = default;
1515

16-
public:
1716
virtual void AddAssertionError(const char* file, int line, const std::string& message) = 0;
1817
};
1918

2019
struct TestAssertionHandlerImpl : TestAssertionHandler
2120
{
2221
explicit TestAssertionHandlerImpl(cucumber_cpp::library::engine::ContextManager& contextManager, report::ReportForwarder& reportHandler);
23-
virtual ~TestAssertionHandlerImpl() = default;
2422

2523
void AddAssertionError(const char* file, int line, const std::string& message) override;
2624

cucumber_cpp/library/engine/TestExecution.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ namespace cucumber_cpp::library::engine
112112
struct TestExecutionImpl : TestExecution
113113
{
114114
TestExecutionImpl(cucumber_cpp::library::engine::ContextManager& contextManager, report::ReportForwarder& reportHandler, HookExecutor& hookExecution, const Policy& executionPolicy = executeRunPolicy);
115+
116+
TestExecutionImpl(const TestExecutionImpl&) = delete;
117+
TestExecutionImpl& operator=(const TestExecutionImpl&) = delete;
118+
115119
virtual ~TestExecutionImpl();
116120

117121
ProgramScope StartRun() override;

0 commit comments

Comments
 (0)