GCC Code Coverage Report


Directory: ./
File: tasks/timofeev_n_lexicographic_ordering/seq/src/ops_seq.cpp
Date: 2026-01-27 01:59:34
Exec Total Coverage
Lines: 15 15 100.0%
Functions: 5 5 100.0%
Branches: 9 10 90.0%

Line Branch Exec Source
1 #include "timofeev_n_lexicographic_ordering/seq/include/ops_seq.hpp"
2
3 #include <cstddef>
4 #include <utility>
5
6 #include "timofeev_n_lexicographic_ordering/common/include/common.hpp"
7
8 namespace timofeev_n_lexicographic_ordering {
9
10
1/2
✓ Branch 1 taken 56 times.
✗ Branch 2 not taken.
56 TimofeevNLexicographicOrderingSEQ::TimofeevNLexicographicOrderingSEQ(const InType &in) {
11 SetTypeOfTask(GetStaticTypeOfTask());
12 GetInput() = in;
13 GetOutput() = std::pair<int, int>(1, 1);
14 56 }
15
16 56 bool TimofeevNLexicographicOrderingSEQ::ValidationImpl() {
17 56 return true;
18 }
19
20 56 bool TimofeevNLexicographicOrderingSEQ::PreProcessingImpl() {
21 56 return true;
22 }
23
24 56 bool TimofeevNLexicographicOrderingSEQ::RunImpl() {
25 56 auto input = GetInput();
26
27 // only true if comparison is true on every step
28
4/4
✓ Branch 0 taken 16 times.
✓ Branch 1 taken 160 times.
✓ Branch 2 taken 40 times.
✓ Branch 3 taken 120 times.
176 for (size_t i = 0; !input.first.empty() && i < input.first.length() - 1; i++) {
29 120 GetOutput().first &= static_cast<int>(input.first[i] <= input.first[i + 1]);
30 }
31
4/4
✓ Branch 0 taken 160 times.
✓ Branch 1 taken 16 times.
✓ Branch 2 taken 40 times.
✓ Branch 3 taken 120 times.
176 for (size_t i = 0; !input.second.empty() && i < input.second.length() - 1; i++) {
32 120 GetOutput().second &= static_cast<int>(input.second[i] <= input.second[i + 1]);
33 }
34
35 56 return true;
36 }
37
38 56 bool TimofeevNLexicographicOrderingSEQ::PostProcessingImpl() {
39 56 return true;
40 }
41
42 } // namespace timofeev_n_lexicographic_ordering
43