Skip to content

Commit b89a62d

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

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

modules/core/task/src/task.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
using namespace std::chrono;
1616

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

@@ -86,13 +92,6 @@ bool ppc::core::Task::IsFullPipelineStage() {
8692
}
8793

8894
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-
9695
if (!functions_order_.empty() || !was_worked_) {
9796
std::terminate();
9897
} else {

0 commit comments

Comments
 (0)