GCC Code Coverage Report


Directory: ./
File: tasks/egashin_k_lexicographical_check/seq/src/ops_seq.cpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 0 19 0.0%
Functions: 0 5 0.0%
Branches: 0 8 0.0%

Line Branch Exec Source
1 #include "egashin_k_lexicographical_check/seq/include/ops_seq.hpp"
2
3 #include <algorithm>
4 #include <cstddef>
5
6 #include "egashin_k_lexicographical_check/common/include/common.hpp"
7
8 namespace egashin_k_lexicographical_check {
9
10 TestTaskSEQ::TestTaskSEQ(const InType &in) {
11 SetTypeOfTask(GetStaticTypeOfTask());
12 GetInput() = in;
13 GetOutput() = false;
14 }
15
16 bool TestTaskSEQ::ValidationImpl() {
17 return true;
18 }
19
20 bool TestTaskSEQ::PreProcessingImpl() {
21 return true;
22 }
23
24 bool TestTaskSEQ::RunImpl() {
25 const auto &s1 = GetInput().first;
26 const auto &s2 = GetInput().second;
27
28 const size_t len1 = s1.size();
29 const size_t len2 = s2.size();
30
31 size_t min_len = std::min(s1.size(), s2.size());
32
33 for (size_t i = 0; i < min_len; ++i) {
34 if (s1[i] < s2[i]) {
35 GetOutput() = true;
36 return true;
37 }
38 if (s1[i] > s2[i]) {
39 GetOutput() = false;
40 return true;
41 }
42 }
43
44 GetOutput() = (len1 < len2);
45
46 return true;
47 }
48
49 bool TestTaskSEQ::PostProcessingImpl() {
50 return true;
51 }
52
53 } // namespace egashin_k_lexicographical_check
54