GCC Code Coverage Report


./
File: tests/test_Sequence.cpp
Date: 2024-08-24 11:26:06
Lines:
367/367
100.0%
Functions:
6/6
100.0%
Branches:
1120/2624
42.7%

Line Branch Exec Source
1 // ./tests/catch2-tests [section] -s
2
3
4 /////////////////////// Qt includes
5 #include <QDebug>
6 #include <QString>
7 #include <QDir>
8
9
10 /////////////////////// IsoSpec
11 #include <IsoSpec++/isoSpec++.h>
12 #include <IsoSpec++/element_tables.h>
13
14
15 /////////////////////// Catch2 includes
16 #include <catch2/catch_test_macros.hpp>
17 #include <catch2/matchers/catch_matchers_floating_point.hpp>
18
19
20 /////////////////////// Local includes
21 #include "TestUtils.hpp"
22 #include <libXpertMass/Monomer.hpp>
23
24 namespace MsXpS
25 {
26
27 namespace libXpertMass
28 {
29
30
31 12 SCENARIO("Sequence_s exist as text")
32 {
33
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
12 TestUtils test_utils;
34
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
12 test_utils.initializeXpertmassLibrary();
35
36
8/14
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 12 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 12 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 8 times.
12 GIVEN("A newly empty allocated sequence")
37 {
38
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 Sequence sequence_1;
39
40
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 WHEN("Setting sequence as 1-letter code text")
41 {
42
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 sequence_1.setMonomerText(test_utils.m_telokinAsMonomerText1Letter);
43
44
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("The sequence can be checked")
45 {
46
8/20
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
4 REQUIRE(sequence_1.monomerText()->toStdString() ==
47 test_utils.m_telokinAsMonomerText1Letter.toStdString());
48
49
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 AND_THEN("Asking for next code starting at index 0 should work")
50 {
51 4 QString next_code;
52 4 int last_parsed_code_char_index = 0;
53 4 QString error;
54 // All the monomer codes are 1-letter-long.
55 int parsed_code_length =
56
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 sequence_1.nextCode(&next_code,
57 &last_parsed_code_char_index,
58 &error,
59 /* code length */ 1);
60
61
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(next_code.toStdString() == "M");
62 // The very first index will be returned because we have a 1-letter
63 // code string and the very first code is at index 0..
64
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(parsed_code_length == 1);
65
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(last_parsed_code_char_index == 0);
66
4/12
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 4 times.
✗ Branch 15 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
4 REQUIRE(!error.size());
67
68
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 AND_THEN(
69 "Asking for next code using and incremented index, should work")
70 {
71 int parsed_code_length =
72 8 sequence_1.nextCode(&next_code,
73
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 &++last_parsed_code_char_index,
74 &error,
75 /* code length */ 1);
76
77
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(next_code.toStdString() == "A");
78
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(parsed_code_length == 1);
79
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(last_parsed_code_char_index == 1);
80
4/12
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 4 times.
✗ Branch 15 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
4 REQUIRE(!error.size());
81 4 }
82 8 }
83 4 }
84 4 }
85 16 }
86
87
8/14
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 12 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 12 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 8 times.
12 GIVEN("A newly empty allocated sequence")
88 {
89
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 Sequence sequence_1;
90
91
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 WHEN("Setting sequence as 3-letter code text")
92 {
93
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 sequence_1.setMonomerText(test_utils.m_telokinAsMonomerText3Letters);
94
95
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("The sequence can be checked")
96 {
97
8/20
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
4 REQUIRE(sequence_1.monomerText()->toStdString() ==
98 test_utils.m_telokinAsMonomerText3Letters.toStdString());
99
100
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 AND_THEN("Asking for next code starting at index 0 should work")
101 {
102 4 QString next_code;
103 4 int last_parsed_code_char_index = 0;
104 4 QString error;
105 // All the monomer codes are 3-letter-long.
106 int parsed_code_length =
107
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 sequence_1.nextCode(&next_code,
108 &last_parsed_code_char_index,
109 &error,
110 /* code length */ 3);
111
112
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(next_code.toStdString() == "Met");
113 // The very first index will be returned because we have a 1-letter
114 // code string and the very first code is at index 0..
115
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(parsed_code_length == 3);
116
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(last_parsed_code_char_index == 2);
117
4/12
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 4 times.
✗ Branch 15 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
4 REQUIRE(!error.size());
118
119
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 AND_THEN(
120 "Asking for next code using and incremented index, should work")
121 {
122 int parsed_code_length =
123 8 sequence_1.nextCode(&next_code,
124
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 &++last_parsed_code_char_index,
125 &error,
126 /* code length */ 3);
127
128
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(next_code.toStdString() == "Ala");
129
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(parsed_code_length == 3);
130
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(last_parsed_code_char_index == 5);
131
4/12
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 4 times.
✗ Branch 15 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
4 REQUIRE(!error.size());
132 4 }
133 8 }
134 4 }
135 4 }
136 16 }
137
138
8/14
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 12 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 12 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 8 times.
12 GIVEN("A newly empty allocated sequence")
139 {
140
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 Sequence sequence_1;
141
142
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 WHEN("Setting sequence as 1-letter code text with spaces, tab, newlines")
143 {
144
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 sequence_1.setMonomerText(
145 test_utils.m_telokinAsMonomerText1LetterWithSpaces);
146
147
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("The sequence can be checked and then spaces eliminated")
148 {
149
8/20
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
4 REQUIRE(
150 sequence_1.monomerText()->toStdString() ==
151 test_utils.m_telokinAsMonomerText1LetterWithSpaces.toStdString());
152
153
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 sequence_1.unspacifyMonomerText();
154
155
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 AND_THEN("All of the spaces should have gone")
156 {
157 // qDebug() << *sequence_1.monomerText();
158 // qDebug() << test_utils.m_telokinAsMonomerText1Letter;
159
160
8/20
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
4 REQUIRE(sequence_1.monomerText()->toStdString() ==
161 test_utils.m_telokinAsMonomerText1Letter.toStdString());
162 4 }
163 4 }
164 4 }
165 16 }
166 12 }
167
168 20 SCENARIO("Sequence_s exist as text and also as a list of Monomer_s")
169 {
170
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 TestUtils test_utils;
171
172
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 test_utils.m_polChemDefName = "protein-1-letter";
173
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 test_utils.m_polChemDefDirName = "protein-1-letter";
174
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 test_utils.m_polChemDefFileBaseName = "protein-1-letter.xml";
175
176
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 test_utils.initializePolChemDef();
177 20 PolChemDefCstSPtr pol_chem_def_csp = test_utils.m_polChemDefSPtr;
178
179
6/16
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 20 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 20 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 20 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 20 times.
✗ Branch 18 not taken.
✓ Branch 21 taken 20 times.
✗ Branch 22 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
20 REQUIRE(pol_chem_def_csp->codeLength() == 1);
180
6/16
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 20 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 20 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 20 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 20 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
20 REQUIRE(pol_chem_def_csp->monomerList().size() == 21);
181
6/16
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 20 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 20 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 20 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 20 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
20 REQUIRE(pol_chem_def_csp->modifList().size() == 26);
182
6/16
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 20 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 20 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 20 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 20 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
20 REQUIRE(pol_chem_def_csp->crossLinkerList().size() == 2);
183
6/16
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 20 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 20 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 20 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 20 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
20 REQUIRE(pol_chem_def_csp->cleaveSpecList().size() == 8);
184
6/16
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 20 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 20 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 20 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 20 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
20 REQUIRE(pol_chem_def_csp->fragSpecList().size() == 7);
185
186
7/14
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 20 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 20 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 20 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 20 times.
✗ Branch 24 not taken.
20 GIVEN("A newly allocated sequence with a string sequence during construction")
187 {
188
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 Sequence sequence_1(test_utils.m_telokinAsMonomerText1Letter);
189
190
7/14
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 20 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 20 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 20 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 20 times.
✗ Branch 24 not taken.
20 WHEN("The Monomer list is crafted")
191 {
192 20 QList<int> error_list;
193
194
1/2
✓ Branch 2 taken 20 times.
✗ Branch 3 not taken.
20 int monomer_count = sequence_1.makeMonomerList(
195 pol_chem_def_csp, /* reset */ false, &error_list);
196
197
8/14
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 20 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 20 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 20 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 16 times.
20 THEN("The Monomer list size can be checked")
198 {
199
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 4 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
4 REQUIRE(monomer_count == sequence_1.monomerText()->size());
200 20 }
201
202
8/14
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 20 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 20 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 20 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 16 times.
✓ Branch 24 taken 4 times.
20 AND_WHEN(
203 "On the basis of the Monomer list, the monomer text is asked for")
204 {
205
6/16
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 16 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 16 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 16 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
16 REQUIRE(sequence_1.makeMonomerText() == monomer_count);
206
207
8/14
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 16 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 16 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 12 times.
16 THEN("The monomer text should be identical to what it was before")
208 {
209
8/20
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
4 REQUIRE(sequence_1.monomerText()->toStdString() ==
210 test_utils.m_telokinAsMonomerText1Letter.toStdString());
211 16 }
212
213
8/14
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 16 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 16 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 12 times.
16 AND_THEN("The isInBound() function might be tested")
214 {
215
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE(sequence_1.isInBound(0) == true);
216
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE(sequence_1.isInBound(monomer_count - 1) == true);
217
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE(sequence_1.isInBound(monomer_count) == false);
218 16 }
219
220
8/14
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 16 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 16 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 12 times.
16 AND_THEN("The 1-letter-code text size and the list size are equal")
221 {
222
7/18
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 4 times.
✗ Branch 19 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
4 REQUIRE(sequence_1.monomerText()->size() ==
223 sequence_1.monomerList().size());
224 16 }
225
226
8/14
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 16 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 16 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 12 times.
16 AND_THEN("The sequence can be validated successfully")
227 {
228
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 4 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
✗ Branch 32 not taken.
✗ Branch 33 not taken.
4 REQUIRE(sequence_1.validate(pol_chem_def_csp) == true);
229 16 }
230 20 }
231 40 }
232 40 }
233 20 }
234
235 8 SCENARIO("Sequence_s can be copied and compared")
236 {
237
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 TestUtils test_utils;
238
239
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.m_polChemDefName = "protein-1-letter";
240
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.m_polChemDefDirName = "protein-1-letter";
241
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.m_polChemDefFileBaseName = "protein-1-letter.xml";
242
243
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.initializePolChemDef();
244 8 PolChemDefCstSPtr pol_chem_def_csp = test_utils.m_polChemDefSPtr;
245
246
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 8 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 8 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 8 times.
✗ Branch 18 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
8 REQUIRE(pol_chem_def_csp->codeLength() == 1);
247
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->monomerList().size() == 21);
248
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->modifList().size() == 26);
249
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->crossLinkerList().size() == 2);
250
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->cleaveSpecList().size() == 8);
251
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->fragSpecList().size() == 7);
252
253
7/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 8 times.
✗ Branch 24 not taken.
8 GIVEN("A newly allocated sequence with a string sequence during construction")
254 {
255
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 Sequence sequence_1(test_utils.m_telokinAsMonomerText1Letter);
256
257
7/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 8 times.
✗ Branch 24 not taken.
8 WHEN("A new Sequence is either copy-constructed or assigned")
258 {
259
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 Sequence sequence_2(sequence_1);
260
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 Sequence sequence_3(sequence_1);
261
262
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 THEN("The two Sequence objects should be identical (monomer text-wise)")
263 {
264
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(sequence_2 == sequence_1);
265
6/16
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE_FALSE(sequence_2 != sequence_1);
266
267
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(sequence_3 == sequence_1);
268
6/16
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE_FALSE(sequence_3 != sequence_1);
269 8 }
270
271
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 AND_WHEN("The monomer list is crafted in both sequences")
272 {
273
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 sequence_1.makeMonomerList(pol_chem_def_csp);
274
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 sequence_2.makeMonomerList(pol_chem_def_csp);
275
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 sequence_3.makeMonomerList(pol_chem_def_csp);
276
277
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN(
278 "The two Sequence objects should be identical (monomer text and "
279 "list-wise)")
280 {
281
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(sequence_1 == sequence_2);
282
6/16
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE_FALSE(sequence_1 != sequence_2);
283
284
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(sequence_3 == sequence_2);
285
6/16
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE_FALSE(sequence_3 != sequence_2);
286 4 }
287 8 }
288 16 }
289 16 }
290 8 }
291
292
293 8 SCENARIO("A motif can be searched in a Sequence")
294 {
295
296
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 TestUtils test_utils;
297
298
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.initializeXpertmassLibrary();
299
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.m_polChemDefName = "protein-1-letter";
300
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.m_polChemDefDirName = "protein-1-letter";
301
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.m_polChemDefFileBaseName = "protein-1-letter.xml";
302
303
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 test_utils.initializePolChemDef();
304 8 PolChemDefCstSPtr pol_chem_def_csp = test_utils.m_polChemDefSPtr;
305
306
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 8 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 8 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 8 times.
✗ Branch 18 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
8 REQUIRE(pol_chem_def_csp->codeLength() == 1);
307
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->monomerList().size() == 21);
308
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->modifList().size() == 26);
309
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->crossLinkerList().size() == 2);
310
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->cleaveSpecList().size() == 8);
311
6/16
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
8 REQUIRE(pol_chem_def_csp->fragSpecList().size() == 7);
312
313
7/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 8 times.
✗ Branch 24 not taken.
8 GIVEN("A newly allocated sequence with a string sequence during construction")
314 {
315
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 Sequence sequence_1(test_utils.m_telokinAsMonomerText1Letter);
316
317 8 QList<int> errorList;
318
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
8 int result = sequence_1.makeMonomerList(pol_chem_def_csp, true, &errorList);
319
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 const QString *monomer_text_p = sequence_1.monomerText();
320
5/14
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 8 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 8 times.
✗ Branch 15 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
8 REQUIRE(result == monomer_text_p->size());
321
322 8 int search_index_1 = 0;
323 8 int search_index_2 = 0;
324 8 int search_index_3 = 0;
325 8 int search_index_4 = 0;
326 8 int search_index_5 = 0;
327 8 int search_index_6 = 0;
328 8 int search_index_7 = 0;
329
330
2/4
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
8 Sequence motif_sequence_1_occurrence("MAMISGM");
331
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
8 motif_sequence_1_occurrence.makeMonomerList(pol_chem_def_csp);
332
333
2/4
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
8 Sequence motif_sequence_6_occurrences("EE");
334
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
8 motif_sequence_6_occurrences.makeMonomerList(pol_chem_def_csp);
335
336
7/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 8 times.
✗ Branch 24 not taken.
8 WHEN("A single-copy existing motif is searched")
337 {
338
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
8 int result_1 = sequence_1.findForwardMotif(
339 &motif_sequence_1_occurrence, pol_chem_def_csp, &search_index_1);
340
341
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 search_index_2 = search_index_1 + motif_sequence_1_occurrence.size();
342
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
8 int result_2 = sequence_1.findForwardMotif(
343 &motif_sequence_1_occurrence, pol_chem_def_csp, &search_index_2);
344
345
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 THEN("The motif should be found only once")
346 {
347
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_1 == 1);
348
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_1 == 0);
349
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_2 == 0);
350 8 }
351
352
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 AND_WHEN("A a seven-copy existing motif is searched")
353 {
354 4 search_index_1 = 0;
355 4 search_index_2 = 0;
356
357 // qDebug() << "search_index_1: " << search_index_1 << std::endl;
358 // qDebug() << "search_index_2: " << search_index_2 << std::endl;
359
360
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_1 = sequence_1.findForwardMotif(
361 &motif_sequence_6_occurrences, pol_chem_def_csp, &search_index_1);
362
363
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 search_index_2 = search_index_1 + motif_sequence_6_occurrences.size();
364
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_2 = sequence_1.findForwardMotif(
365 &motif_sequence_6_occurrences, pol_chem_def_csp, &search_index_2);
366
367
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 search_index_3 = search_index_2 + motif_sequence_6_occurrences.size();
368
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_3 = sequence_1.findForwardMotif(
369 &motif_sequence_6_occurrences, pol_chem_def_csp, &search_index_3);
370
371
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 search_index_4 = search_index_3 + motif_sequence_6_occurrences.size();
372
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_4 = sequence_1.findForwardMotif(
373 &motif_sequence_6_occurrences, pol_chem_def_csp, &search_index_4);
374
375
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 search_index_5 = search_index_4 + motif_sequence_6_occurrences.size();
376
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_5 = sequence_1.findForwardMotif(
377 &motif_sequence_6_occurrences, pol_chem_def_csp, &search_index_5);
378
379
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 search_index_6 = search_index_5 + motif_sequence_6_occurrences.size();
380
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_6 = sequence_1.findForwardMotif(
381 &motif_sequence_6_occurrences, pol_chem_def_csp, &search_index_6);
382
383
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 search_index_7 = search_index_6 + motif_sequence_6_occurrences.size();
384
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_7 = sequence_1.findForwardMotif(
385 &motif_sequence_6_occurrences, pol_chem_def_csp, &search_index_7);
386
387
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("The motif should be found seven times")
388 {
389
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_1 == 1);
390
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_1 == 33);
391
392
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_2 == 1);
393
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_2 == 37);
394
395
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_3 == 1);
396
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_3 == 96);
397
398
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_4 == 1);
399
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_4 == 148);
400
401
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_5 == 1);
402
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_5 == 151);
403
404
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_6 == 1);
405
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_6 == 153);
406
407
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_7 == 1);
408
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_7 == 155);
409 4 }
410 8 }
411 8 }
412 16 }
413 8 }
414
415 4 SCENARIO("A number of checks might be performed on a Sequence")
416 {
417
418
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 TestUtils test_utils;
419
420
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 test_utils.initializeXpertmassLibrary();
421
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 test_utils.m_polChemDefName = "protein-1-letter";
422
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 test_utils.m_polChemDefDirName = "protein-1-letter";
423
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 test_utils.m_polChemDefFileBaseName = "protein-1-letter.xml";
424
425
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 test_utils.initializePolChemDef();
426 4 PolChemDefCstSPtr pol_chem_def_csp = test_utils.m_polChemDefSPtr;
427
428
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 4 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
4 REQUIRE(pol_chem_def_csp->codeLength() == 1);
429
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 4 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 4 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(pol_chem_def_csp->monomerList().size() == 21);
430
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 4 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 4 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(pol_chem_def_csp->modifList().size() == 26);
431
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 4 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 4 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(pol_chem_def_csp->crossLinkerList().size() == 2);
432
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 4 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 4 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(pol_chem_def_csp->cleaveSpecList().size() == 8);
433
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 4 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 4 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
4 REQUIRE(pol_chem_def_csp->fragSpecList().size() == 7);
434
435
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 GIVEN("A newly allocated sequence with a string sequence during construction")
436 {
437
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 Sequence sequence_1(test_utils.m_telokinAsMonomerText1Letter);
438
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 const QString *monomer_text_p = sequence_1.monomerText();
439
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 4 times.
✗ Branch 15 not taken.
✓ Branch 18 taken 4 times.
✗ Branch 19 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
4 REQUIRE(monomer_text_p->size() == test_utils.m_telokinSequenceMonomerCount);
440
441 4 QList<int> errorList;
442
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result = sequence_1.makeMonomerList(pol_chem_def_csp, true, &errorList);
443
444 bool all_correct =
445
3/6
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 4 times.
✗ Branch 7 not taken.
4 (result == monomer_text_p->size() && sequence_1.size() == result);
446
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(all_correct == true);
447
448 4 int tested_index = 0;
449
450
451
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("It is possible to check if an index is inbound or not")
452 {
453
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE(sequence_1.isInBound(tested_index) == true);
454
455 4 tested_index = result / 2;
456
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE(sequence_1.isInBound(tested_index) == true);
457
458 4 tested_index = result - 1;
459
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE(sequence_1.isInBound(tested_index) == true);
460
461 4 tested_index = result;
462
6/16
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 20 taken 4 times.
✗ Branch 21 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
4 REQUIRE(sequence_1.isInBound(tested_index) == false);
463 4 }
464 8 }
465 4 }
466
467 32 SCENARIO("Monomers can be added or removed from a Sequence")
468 {
469
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 TestUtils test_utils;
470
471
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 test_utils.initializeXpertmassLibrary();
472
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 test_utils.m_polChemDefName = "protein-1-letter";
473
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 test_utils.m_polChemDefDirName = "protein-1-letter";
474
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 test_utils.m_polChemDefFileBaseName = "protein-1-letter.xml";
475
476
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 test_utils.initializePolChemDef();
477 32 PolChemDefCstSPtr pol_chem_def_csp = test_utils.m_polChemDefSPtr;
478
479
6/16
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 32 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 32 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 32 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 32 times.
✗ Branch 18 not taken.
✓ Branch 21 taken 32 times.
✗ Branch 22 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
32 REQUIRE(pol_chem_def_csp->codeLength() == 1);
480
6/16
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 32 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 32 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 32 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 32 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
32 REQUIRE(pol_chem_def_csp->monomerList().size() == 21);
481
6/16
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 32 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 32 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 32 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 32 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
32 REQUIRE(pol_chem_def_csp->modifList().size() == 26);
482
6/16
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 32 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 32 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 32 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 32 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
32 REQUIRE(pol_chem_def_csp->crossLinkerList().size() == 2);
483
6/16
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 32 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 32 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 32 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 32 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
32 REQUIRE(pol_chem_def_csp->cleaveSpecList().size() == 8);
484
6/16
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 32 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 32 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 32 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 32 times.
✗ Branch 23 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
32 REQUIRE(pol_chem_def_csp->fragSpecList().size() == 7);
485
486
7/14
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 32 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 32 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 32 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 32 times.
✗ Branch 24 not taken.
32 GIVEN("A newly allocated sequence with a string sequence during construction")
487 {
488
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 Sequence sequence_1(test_utils.m_telokinAsMonomerText1Letter);
489
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 const QString *monomer_text_p = sequence_1.monomerText();
490
5/14
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 32 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 32 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 32 times.
✗ Branch 15 not taken.
✓ Branch 18 taken 32 times.
✗ Branch 19 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
32 REQUIRE(monomer_text_p->size() == test_utils.m_telokinSequenceMonomerCount);
491
492 32 QList<int> errorList;
493
1/2
✓ Branch 2 taken 32 times.
✗ Branch 3 not taken.
32 int result = sequence_1.makeMonomerList(pol_chem_def_csp, true, &errorList);
494
495 bool all_correct =
496
3/6
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 32 times.
✗ Branch 7 not taken.
32 (result == monomer_text_p->size() && sequence_1.size() == result);
497
5/14
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 32 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 32 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 32 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 32 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
32 REQUIRE(all_correct == true);
498
499
8/14
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 32 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 32 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 32 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 8 times.
✓ Branch 24 taken 24 times.
32 WHEN("A monomer is inserted at the beginining of the sequence")
500 {
501
4/10
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 8 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
8 Monomer *monomer_1_p = new Monomer(pol_chem_def_csp, "Tryptophan", "W");
502
503
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 sequence_1.insertMonomerAt(monomer_1_p, 0);
504
505
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 THEN("That monomer has to be found there")
506 {
507
8/20
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
4 REQUIRE(sequence_1.at(0)->code().toStdString() == "W");
508
509 // sequence_1.makeMonomerText();
510 // qDebug() << "Sequence: " << *sequence_1.monomerText();
511 8 }
512
513
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 AND_WHEN("When searching for a motif comprising that monomer")
514 {
515
2/4
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
4 Sequence motif_sequence_1_occurrence("WMAMISGMSGR");
516
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 motif_sequence_1_occurrence.makeMonomerList(pol_chem_def_csp);
517 4 int search_index_1 = 0;
518
519
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_1 = sequence_1.findForwardMotif(
520 &motif_sequence_1_occurrence, pol_chem_def_csp, &search_index_1);
521
522
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("The search is successful")
523 {
524
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_1 == true);
525
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_1 == 0);
526 4 }
527 12 }
528 32 }
529
530
8/14
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 32 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 32 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 32 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 8 times.
✓ Branch 24 taken 24 times.
32 WHEN("A monomer is inserted at the end of the sequence")
531 {
532
4/10
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 8 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
8 Monomer *monomer_1_p = new Monomer(pol_chem_def_csp, "Tryptophan", "W");
533
534
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
8 sequence_1.insertMonomerAt(monomer_1_p,
535 test_utils.m_telokinSequenceMonomerCount);
536
537
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 THEN("That monomer has to be found there")
538 {
539
8/20
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
4 REQUIRE(sequence_1.at(test_utils.m_telokinSequenceMonomerCount)
540 ->code()
541 .toStdString() == "W");
542
543 // sequence_1.makeMonomerText();
544 // qDebug() << "Sequence: " << *sequence_1.monomerText();
545 8 }
546
547
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 AND_WHEN("When searching for a motif comprising that monomer")
548 {
549
2/4
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
4 Sequence motif_sequence_1_occurrence("EEEEEEW");
550
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 motif_sequence_1_occurrence.makeMonomerList(pol_chem_def_csp);
551 4 int search_index_1 = 0;
552
553
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_1 = sequence_1.findForwardMotif(
554 &motif_sequence_1_occurrence, pol_chem_def_csp, &search_index_1);
555
556
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("The search is successful")
557 {
558
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_1 == true);
559
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_1 == 151);
560 4 }
561 12 }
562 32 }
563
564
8/14
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 32 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 32 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 32 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 32 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 16 times.
✓ Branch 24 taken 16 times.
32 WHEN("A monomer is inserted in the middle of the sequence")
565 {
566
4/10
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 16 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 16 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 16 times.
✗ Branch 13 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
16 Monomer *monomer_1_p = new Monomer(pol_chem_def_csp, "Tryptophan", "W");
567
568 16 int floor = std::floor(result / 2);
569 // qDebug() << "The floor:" << floor;
570
571
1/2
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
16 sequence_1.insertMonomerAt(monomer_1_p, floor);
572
573
8/14
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 16 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 16 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 12 times.
16 THEN("That monomer has to be found there")
574 {
575
8/20
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 4 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
4 REQUIRE(sequence_1.at(floor)->code().toStdString() == "W");
576
577 // sequence_1.makeMonomerText();
578 // qDebug() << "Sequence: " << *sequence_1.monomerText();
579 16 }
580
581
8/14
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 16 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 16 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 8 times.
✓ Branch 24 taken 8 times.
16 AND_WHEN("When searching for a motif comprising that monomer")
582 {
583
2/4
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
8 Sequence motif_sequence_1_occurrence("DPEVMWWYKDDQ");
584
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
8 motif_sequence_1_occurrence.makeMonomerList(pol_chem_def_csp);
585 8 int search_index_1 = 0;
586
587
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
8 int result_1 = sequence_1.findForwardMotif(
588 &motif_sequence_1_occurrence, pol_chem_def_csp, &search_index_1);
589
590
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 THEN("The search is successful")
591 {
592
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_1 == true);
593
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_1 == 72);
594 8 }
595
596
8/14
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 8 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 8 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 4 times.
8 AND_WHEN("That monomer is removed back")
597 {
598
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
4 sequence_1.removeMonomerAt(floor);
599
600 // sequence_1.makeMonomerText();
601 // qDebug() << "Sequence: " << *sequence_1.monomerText();
602
603
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("The sequence with the inserted monomer cannot be found anymore")
604 {
605 4 search_index_1 = 0;
606
607
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 result_1 = sequence_1.findForwardMotif(
608 &motif_sequence_1_occurrence, pol_chem_def_csp, &search_index_1);
609
610
611
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_1 == 0);
612
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_1 == 0);
613
614
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 AND_THEN("The original sequence can be found again")
615 {
616
617
2/4
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
4 motif_sequence_1_occurrence.setMonomerText("DPEVMWYKDDQ");
618 4 QList<int> errorList;
619
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 motif_sequence_1_occurrence.makeMonomerList(
620 pol_chem_def_csp, true, &errorList);
621 4 search_index_1 = 0;
622
623 result_1 =
624
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 sequence_1.findForwardMotif(&motif_sequence_1_occurrence,
625 pol_chem_def_csp,
626 &search_index_1);
627
628
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_1 == 1);
629
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_1 == 72);
630 8 }
631 4 }
632 8 }
633 24 }
634
635
8/14
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 16 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 16 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 12 times.
16 WHEN("A monomer sequence text is appended to the Sequence")
636 {
637
2/4
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
4 sequence_1.appendMonomerText("THISTEQST");
638 4 QList<int> errorList;
639
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 sequence_1.makeMonomerList(pol_chem_def_csp, true, &errorList);
640
641
642
7/14
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 4 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 4 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
4 THEN("Searching for it should return the right index")
643 {
644
2/4
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
4 Sequence motif_sequence_1_occurrence("EEEEEETHISTEQST");
645
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 motif_sequence_1_occurrence.makeMonomerList(pol_chem_def_csp);
646 4 int search_index_1 = 0;
647
648
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
4 int result_1 = sequence_1.findForwardMotif(
649 &motif_sequence_1_occurrence, pol_chem_def_csp, &search_index_1);
650
651
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(result_1 == true);
652
5/14
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
4 REQUIRE(search_index_1 == 151);
653 8 }
654 20 }
655 32 }
656 64 }
657 32 }
658
659 } // namespace libXpertMass
660 } // namespace MsXpS
661