GCC Code Coverage Report


Directory: ./
File: tasks/goriacheva_k_violation_order_elem_vec/seq/src/ops_seq.cpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 20 20 100.0%
Functions: 5 5 100.0%
Branches: 6 8 75.0%

Line Branch Exec Source
1 #include "goriacheva_k_violation_order_elem_vec/seq/include/ops_seq.hpp"
2
3 #include <cstddef>
4 #include <vector>
5
6 #include "goriacheva_k_violation_order_elem_vec/common/include/common.hpp"
7
8 namespace goriacheva_k_violation_order_elem_vec {
9
10
1/2
✓ Branch 1 taken 298 times.
✗ Branch 2 not taken.
298 GoriachevaKViolationOrderElemVecSEQ::GoriachevaKViolationOrderElemVecSEQ(const InType &in) {
11 SetTypeOfTask(GetStaticTypeOfTask());
12
1/2
✓ Branch 1 taken 298 times.
✗ Branch 2 not taken.
298 GetInput() = in;
13 298 GetOutput() = 0;
14 298 }
15
16 298 bool GoriachevaKViolationOrderElemVecSEQ::ValidationImpl() {
17 298 return true;
18 }
19
20 298 bool GoriachevaKViolationOrderElemVecSEQ::PreProcessingImpl() {
21 298 input_vec_ = GetInput();
22 298 result_ = 0;
23 298 return true;
24 }
25
26 298 bool GoriachevaKViolationOrderElemVecSEQ::RunImpl() {
27 298 input_vec_ = GetInput();
28 298 result_ = 0;
29
30 if (input_vec_.size() <= 1) {
31 result_ = 0;
32 }
33
34
2/2
✓ Branch 0 taken 1258 times.
✓ Branch 1 taken 298 times.
1556 for (size_t i = 0; i + 1 < input_vec_.size(); ++i) {
35
2/2
✓ Branch 0 taken 482 times.
✓ Branch 1 taken 776 times.
1258 if (input_vec_[i] > input_vec_[i + 1]) {
36 482 ++result_;
37 }
38 }
39
40 298 return true;
41 }
42
43 298 bool GoriachevaKViolationOrderElemVecSEQ::PostProcessingImpl() {
44 298 GetOutput() = result_;
45 298 return true;
46 }
47
48 } // namespace goriacheva_k_violation_order_elem_vec
49