GCC Code Coverage Report


Directory: ./
File: tasks/khruev_a_min_elem_vec/seq/src/ops_seq.cpp
Date: 2025-12-13 04:24:21
Exec Total Coverage
Lines: 19 19 100.0%
Functions: 5 5 100.0%
Branches: 8 10 80.0%

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