Skip to content

Commit b218954

Browse files
committed
fix coverage 3
2 parents 677e6ea + c7e1d3b commit b218954

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/core/task/src/task.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <algorithm>
44
#include <chrono>
55
#include <cstddef>
6+
#include <cstdlib>
67
#include <exception>
78
#include <functional>
89
#include <iomanip>
@@ -15,6 +16,12 @@
1516
using namespace std::chrono;
1617

1718
ppc::core::Task::Task(StateOfTesting state_of_testing) : state_of_testing_(state_of_testing) {
19+
auto custom_terminate = []() {
20+
std::cerr << "ORDER OF FUNCTIONS IS NOT RIGHT! \n"
21+
"Expected - \"Validation\", \"PreProcessing\", \"Run\", \"PostProcessing\" \n";
22+
std::exit(404);
23+
};
24+
std::set_terminate(custom_terminate);
1825
functions_order_.clear();
1926
}
2027

@@ -86,13 +93,6 @@ bool ppc::core::Task::IsFullPipelineStage() {
8693
}
8794

8895
ppc::core::Task::~Task() {
89-
auto custom_terminate = []() {
90-
std::cerr << "ORDER OF FUNCTIONS IS NOT RIGHT! \n"
91-
"Expected - \"Validation\", \"PreProcessing\", \"Run\", \"PostProcessing\" \n";
92-
std::exit(404);
93-
};
94-
std::set_terminate(custom_terminate);
95-
9696
if (!functions_order_.empty() || !was_worked_) {
9797
std::terminate();
9898
} else {

0 commit comments

Comments
 (0)