GCC Code Coverage Report


Directory: ./
File: tasks/marin_l_cnt_mismat_chrt_in_two_str/seq/src/ops_seq.cpp
Date: 2026-01-27 01:59:34
Exec Total Coverage
Lines: 17 17 100.0%
Functions: 5 5 100.0%
Branches: 5 6 83.3%

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