GCC Code Coverage Report


Directory: ./
File: tasks/shkryleva_s_vec_min_val/seq/src/ops_seq.cpp
Date: 2026-02-23 23:20:07
Exec Total Coverage
Lines: 20 20 100.0%
Functions: 5 5 100.0%
Branches: 8 10 80.0%

Line Branch Exec Source
1 #include "shkryleva_s_vec_min_val/seq/include/ops_seq.hpp"
2
3 #include <algorithm>
4 #include <cstddef>
5 #include <limits>
6 #include <vector>
7
8 #include "shkryleva_s_vec_min_val/common/include/common.hpp"
9
10 namespace shkryleva_s_vec_min_val {
11
12
1/2
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
50 ShkrylevaSVecMinValSEQ::ShkrylevaSVecMinValSEQ(const InType &in) {
13 SetTypeOfTask(GetStaticTypeOfTask());
14
1/2
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
50 GetInput() = in;
15 50 GetOutput() = 0;
16 50 }
17
18 50 bool ShkrylevaSVecMinValSEQ::ValidationImpl() {
19 50 return true;
20 }
21
22 50 bool ShkrylevaSVecMinValSEQ::PreProcessingImpl() {
23 50 GetOutput() = std::numeric_limits<int>::max();
24 50 return true;
25 }
26
27
2/2
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 42 times.
50 bool ShkrylevaSVecMinValSEQ::RunImpl() {
28 const auto &input = GetInput();
29
30
2/2
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 42 times.
50 if (input.empty()) {
31 8 GetOutput() = std::numeric_limits<int>::max();
32 8 return true;
33 }
34
35 42 int min_val = input.front();
36
2/2
✓ Branch 0 taken 114 times.
✓ Branch 1 taken 42 times.
156 for (std::size_t i = 1; i < input.size(); ++i) {
37 114 min_val = std::min(input[i], min_val);
38 }
39
40 42 GetOutput() = min_val;
41 42 return true;
42 }
43
44 50 bool ShkrylevaSVecMinValSEQ::PostProcessingImpl() {
45 50 return true;
46 }
47
48 } // namespace shkryleva_s_vec_min_val
49