GCC Code Coverage Report


Directory: ./
File: tasks/sinev_a_min_in_vector/seq/src/ops_seq.cpp
Date: 2026-01-27 01:59:34
Exec Total Coverage
Lines: 16 16 100.0%
Functions: 5 5 100.0%
Branches: 6 10 60.0%

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