Line |
Branch |
Exec |
Source |
1 |
|
|
// ./tests/catch2-tests [section] -s |
2 |
|
|
|
3 |
|
|
|
4 |
|
|
/////////////////////// Stdlib includes |
5 |
|
|
#include <cassert> |
6 |
|
|
|
7 |
|
|
/////////////////////// Qt includes |
8 |
|
|
#include <QDebug> |
9 |
|
|
#include <QString> |
10 |
|
|
#include <QDir> |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
/////////////////////// IsoSpec |
14 |
|
|
#include <IsoSpec++/isoSpec++.h> |
15 |
|
|
#include <IsoSpec++/element_tables.h> |
16 |
|
|
|
17 |
|
|
|
18 |
|
|
/////////////////////// Catch2 includes |
19 |
|
|
#include <catch2/catch_test_macros.hpp> |
20 |
|
|
#include <catch2/matchers/catch_matchers_floating_point.hpp> |
21 |
|
|
|
22 |
|
|
|
23 |
|
|
/////////////////////// Local includes |
24 |
|
|
#include "tests-config.h" |
25 |
|
|
#include <libXpertMass/globals.hpp> |
26 |
|
|
#include <libXpertMass/IsotopicData.hpp> |
27 |
|
|
#include <libXpertMass/PolChemDefSpec.hpp> |
28 |
|
|
#include <libXpertMass/PolChemDef.hpp> |
29 |
|
|
|
30 |
|
|
namespace MsXpS |
31 |
|
|
{ |
32 |
|
|
|
33 |
|
|
namespace libXpertMass |
34 |
|
|
{ |
35 |
|
|
|
36 |
|
|
// In the tests below, we do not use TestUtils because we want |
37 |
|
|
// more granularity that what is -by design- offered by TestUtils. |
38 |
|
20 |
SCENARIO( |
39 |
|
|
"PolChemDef instantiated using the specification in a PolChemDefSpec " |
40 |
|
|
"instance") |
41 |
|
|
{ |
42 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
PolChemDefSpec pol_chem_def_spec; |
43 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
PolChemDef pol_chem_def; |
44 |
|
|
|
45 |
|
|
// We use polymer chemistry definitions copied to the |
46 |
|
|
// tests/data/polymer-chemistry-definitions directory. |
47 |
|
|
QString test_pol_chem_defs_dir = |
48 |
3/6
✓ 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.
|
40 |
QString("%1/polymer-chemistry-definitions").arg(TESTS_INPUT_DIR); |
49 |
|
|
|
50 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString pol_chem_def_name = "protein-1-letter"; |
51 |
|
|
QString pol_chem_def_file_base_name = |
52 |
2/4
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
|
40 |
QString("%1.xml").arg(pol_chem_def_name); |
53 |
|
|
|
54 |
|
|
// Relative is to one of the polChemDefs directory (in system or user |
55 |
|
|
// directory) |
56 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString pol_chem_def_relative_dir_path = "protein-1-letter"; |
57 |
|
|
|
58 |
|
|
QString pol_chem_def_relative_file_path = |
59 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString("%1/%2") |
60 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(pol_chem_def_relative_dir_path) |
61 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
.arg(pol_chem_def_file_base_name); |
62 |
|
|
|
63 |
|
|
QString pol_chem_def_absolute_dir_path = |
64 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString("%1/%2") |
65 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(test_pol_chem_defs_dir) |
66 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
.arg(pol_chem_def_relative_dir_path); |
67 |
|
|
|
68 |
|
|
QString pol_chem_def_absolute_file_path = |
69 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString("%1/%2") |
70 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(pol_chem_def_absolute_dir_path) |
71 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
.arg(pol_chem_def_file_base_name); |
72 |
|
|
|
73 |
|
|
|
74 |
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 |
GIVEN("Constructing an empty PolChemDefSpec") |
75 |
|
|
{ |
76 |
|
|
|
77 |
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 member data are empty") |
78 |
|
|
{ |
79 |
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(pol_chem_def_spec.name() == ""); |
80 |
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(pol_chem_def_spec.getFilePath() == ""); |
81 |
|
4 |
} |
82 |
|
20 |
} |
83 |
|
|
|
84 |
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_GIVEN("Set name and file path") |
85 |
|
|
{ |
86 |
1/2
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
|
16 |
pol_chem_def_spec.setName(pol_chem_def_file_base_name); |
87 |
1/2
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
|
16 |
pol_chem_def_spec.setFilePath(pol_chem_def_relative_file_path); |
88 |
|
|
|
89 |
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 name and file path are set to the member data") |
90 |
|
|
{ |
91 |
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(pol_chem_def_spec.name().toStdString() == |
92 |
|
|
pol_chem_def_file_base_name.toStdString()); |
93 |
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 29 taken 4 times.
✗ Branch 30 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
|
4 |
REQUIRE(pol_chem_def_spec.getFilePath().toStdString() == |
94 |
|
|
pol_chem_def_relative_file_path.toStdString()); |
95 |
|
16 |
} |
96 |
|
|
|
97 |
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 12 times.
✓ Branch 24 taken 4 times.
|
16 |
AND_GIVEN("That PolChemDefSpec, allocate a PolChemDef") |
98 |
|
|
{ |
99 |
1/2
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
12 |
PolChemDef pol_chem_def(pol_chem_def_spec); |
100 |
|
|
|
101 |
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 |
THEN("The PolChemDef name is set to the PolChemDefSpec name") |
102 |
|
|
{ |
103 |
9/22
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✓ Branch 32 taken 4 times.
✗ Branch 33 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
|
4 |
REQUIRE(pol_chem_def.name().toStdString() == |
104 |
|
|
pol_chem_def_spec.name().toStdString()); |
105 |
|
12 |
} |
106 |
|
|
|
107 |
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 |
AND_THEN("The file path is set also") |
108 |
|
|
{ |
109 |
9/22
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✓ Branch 33 taken 4 times.
✗ Branch 34 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
|
4 |
REQUIRE(pol_chem_def.getXmlDataFilePath().toStdString() == |
110 |
|
|
pol_chem_def_spec.getFilePath().toStdString()); |
111 |
|
12 |
} |
112 |
|
|
|
113 |
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 |
AND_THEN("Code length value is 1") |
114 |
|
|
{ |
115 |
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(pol_chem_def.codeLength() == 1); |
116 |
|
12 |
} |
117 |
|
28 |
} |
118 |
|
20 |
} |
119 |
|
20 |
} |
120 |
|
|
|
121 |
|
|
|
122 |
|
20 |
SCENARIO("PolChemDef instantiated empty") |
123 |
|
|
{ |
124 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
PolChemDef pol_chem_def; |
125 |
|
20 |
PolChemDefSPtr pol_chem_def_sp = nullptr; |
126 |
|
|
|
127 |
|
|
// We use polymer chemistry definitions copied to the |
128 |
|
|
// tests/data/polymer-chemistry-definitions directory. |
129 |
|
|
QString test_pol_chem_defs_dir = |
130 |
3/6
✓ 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.
|
40 |
QString("%1/polymer-chemistry-definitions").arg(TESTS_INPUT_DIR); |
131 |
|
|
|
132 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString pol_chem_def_name = "protein-1-letter"; |
133 |
|
|
QString pol_chem_def_file_base_name = |
134 |
2/4
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
|
40 |
QString("%1.xml").arg(pol_chem_def_name); |
135 |
|
|
|
136 |
|
|
// Relative is to one of the polChemDefs directory (in system or user |
137 |
|
|
// directory) |
138 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString pol_chem_def_relative_dir_path = "protein-1-letter"; |
139 |
|
|
|
140 |
|
|
QString pol_chem_def_relative_file_path = |
141 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString("%1/%2") |
142 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(pol_chem_def_relative_dir_path) |
143 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
.arg(pol_chem_def_file_base_name); |
144 |
|
|
|
145 |
|
|
QString pol_chem_def_isotopic_data_relative_file_path = |
146 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString("%1/%2/%3") |
147 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(pol_chem_def_relative_dir_path) |
148 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(pol_chem_def_file_base_name) |
149 |
2/4
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
|
20 |
.arg("isotopic-data.dat"); |
150 |
|
|
|
151 |
|
|
QString pol_chem_def_absolute_dir_path = |
152 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString("%1/%2") |
153 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(test_pol_chem_defs_dir) |
154 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
.arg(pol_chem_def_relative_dir_path); |
155 |
|
|
|
156 |
|
|
// qDebug() << "The dir: " << pol_chem_def_absolute_dir_path.toStdString() |
157 |
|
|
// << std::endl; |
158 |
|
|
|
159 |
|
|
QString pol_chem_def_absolute_file_path = |
160 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString("%1/%2") |
161 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(pol_chem_def_absolute_dir_path) |
162 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
.arg(pol_chem_def_file_base_name); |
163 |
|
|
|
164 |
|
|
QString pol_chem_def_isotopic_data_absolute_file_path = |
165 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 |
QString("%1/%2") |
166 |
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
40 |
.arg(pol_chem_def_absolute_dir_path) |
167 |
2/4
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
|
20 |
.arg("isotopic-data.dat"); |
168 |
|
|
|
169 |
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 |
GIVEN("Constructing an empty PolChemDef") |
170 |
|
|
{ |
171 |
|
|
|
172 |
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 member data are empty") |
173 |
|
|
{ |
174 |
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(pol_chem_def.name() == ""); |
175 |
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(pol_chem_def.getXmlDataFilePath() == ""); |
176 |
|
4 |
} |
177 |
|
20 |
} |
178 |
|
|
|
179 |
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 |
WHEN("Setting name and XML file path") |
180 |
|
|
{ |
181 |
1/2
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
|
16 |
pol_chem_def.setName(pol_chem_def_file_base_name); |
182 |
1/2
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
|
16 |
pol_chem_def.setXmlDataFilePath(pol_chem_def_absolute_file_path); |
183 |
|
|
|
184 |
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 name and file path are set to the member data") |
185 |
|
|
{ |
186 |
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 29 taken 4 times.
✗ Branch 30 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
|
4 |
REQUIRE(pol_chem_def.name().toStdString() == |
187 |
|
|
pol_chem_def_file_base_name.toStdString()); |
188 |
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 29 taken 4 times.
✗ Branch 30 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
|
4 |
REQUIRE(pol_chem_def.getXmlDataFilePath().toStdString() == |
189 |
|
|
pol_chem_def_absolute_file_path.toStdString()); |
190 |
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 29 taken 4 times.
✗ Branch 30 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
|
4 |
REQUIRE(pol_chem_def.getXmlDataDirPath().toStdString() == |
191 |
|
|
pol_chem_def_absolute_dir_path.toStdString()); |
192 |
|
16 |
} |
193 |
|
|
|
194 |
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 path to the isotopic data can be deduced") |
195 |
|
|
{ |
196 |
|
|
QString isotopic_data_file_path = |
197 |
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
|
4 |
pol_chem_def.deduceIsotopicDataFilePath(); |
198 |
|
|
|
199 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(isotopic_data_file_path.toStdString() == |
200 |
|
|
pol_chem_def_isotopic_data_absolute_file_path.toStdString()); |
201 |
|
20 |
} |
202 |
|
|
|
203 |
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("Loading isotopic data from disk file using static function") |
204 |
|
|
{ |
205 |
|
|
|
206 |
|
|
// REQUIRE(pol_chem_def.name().toStdString() == |
207 |
|
|
// pol_chem_def_file_base_name.toStdString()); |
208 |
|
|
// REQUIRE(pol_chem_def.getXmlDataFilePath().toStdString() == |
209 |
|
|
// pol_chem_def_absolute_file_path.toStdString()); |
210 |
|
|
// REQUIRE(pol_chem_def.getXmlDataDirPath().toStdString() == |
211 |
|
|
// pol_chem_def_absolute_dir_path.toStdString()); |
212 |
|
|
|
213 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
pol_chem_def_sp = std::make_shared<PolChemDef>(pol_chem_def); |
214 |
5/14
✓ 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 13 taken 8 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 8 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
|
8 |
REQUIRE(pol_chem_def_sp != nullptr); |
215 |
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(pol_chem_def_sp.use_count() == 1); |
216 |
|
|
|
217 |
1/2
✓ Branch 3 taken 8 times.
✗ Branch 4 not taken.
|
8 |
std::size_t isotope_count = PolChemDef::loadIsotopicData(pol_chem_def_sp); |
218 |
|
|
|
219 |
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("Count the isotopes that have been loaded") |
220 |
|
|
{ |
221 |
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(isotope_count > 0); |
222 |
|
|
// qDebug() << "Loaded " << isotope_count << " isotopes" << std::endl; |
223 |
|
8 |
} |
224 |
|
|
|
225 |
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 |
WHEN("Loading the polymer chemistry definition using static function") |
226 |
|
|
{ |
227 |
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(pol_chem_def_sp != nullptr); |
228 |
|
|
|
229 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
bool result = PolChemDef::renderXmlPolChemDefFile(pol_chem_def_sp); |
230 |
|
|
|
231 |
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("That should not fail") |
232 |
|
|
{ |
233 |
|
|
|
234 |
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 == true); |
235 |
|
4 |
} |
236 |
|
8 |
} |
237 |
|
16 |
} |
238 |
|
20 |
} |
239 |
|
20 |
} |
240 |
|
|
|
241 |
|
36 |
SCENARIO("Loading a PolChemDef") |
242 |
|
|
{ |
243 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
PolChemDef pol_chem_def; |
244 |
|
36 |
PolChemDefSPtr pol_chem_def_sp = nullptr; |
245 |
|
|
|
246 |
|
|
// We use polymer chemistry definitions copied to the |
247 |
|
|
// tests/data/polymer-chemistry-definitions directory. |
248 |
|
|
QString test_pol_chem_defs_dir = |
249 |
3/6
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
|
72 |
QString("%1/polymer-chemistry-definitions").arg(TESTS_INPUT_DIR); |
250 |
|
|
|
251 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
QString pol_chem_def_name = "protein-1-letter"; |
252 |
|
|
QString pol_chem_def_file_base_name = |
253 |
2/4
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
|
72 |
QString("%1.xml").arg(pol_chem_def_name); |
254 |
|
|
|
255 |
|
|
// Relative is to one of the polChemDefs directory (in system or user |
256 |
|
|
// directory) |
257 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
QString pol_chem_def_relative_dir_path = "protein-1-letter"; |
258 |
|
|
|
259 |
|
|
QString pol_chem_def_relative_file_path = |
260 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
QString("%1/%2") |
261 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
72 |
.arg(pol_chem_def_relative_dir_path) |
262 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
.arg(pol_chem_def_file_base_name); |
263 |
|
|
|
264 |
|
|
QString pol_chem_def_isotopic_data_relative_file_path = |
265 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
QString("%1/%2/%3") |
266 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
72 |
.arg(pol_chem_def_relative_dir_path) |
267 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
72 |
.arg(pol_chem_def_file_base_name) |
268 |
2/4
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
|
36 |
.arg("isotopic-data.dat"); |
269 |
|
|
|
270 |
|
|
QString pol_chem_def_absolute_dir_path = |
271 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
QString("%1/%2") |
272 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
72 |
.arg(test_pol_chem_defs_dir) |
273 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
.arg(pol_chem_def_relative_dir_path); |
274 |
|
|
|
275 |
|
|
// qDebug() << "The dir: " << pol_chem_def_absolute_dir_path.toStdString() |
276 |
|
|
// << std::endl; |
277 |
|
|
|
278 |
|
|
QString pol_chem_def_absolute_file_path = |
279 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
QString("%1/%2") |
280 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
72 |
.arg(pol_chem_def_absolute_dir_path) |
281 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
.arg(pol_chem_def_file_base_name); |
282 |
|
|
|
283 |
|
|
QString pol_chem_def_isotopic_data_absolute_file_path = |
284 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
QString("%1/%2") |
285 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
72 |
.arg(pol_chem_def_absolute_dir_path) |
286 |
2/4
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
|
36 |
.arg("isotopic-data.dat"); |
287 |
|
|
|
288 |
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
|
36 |
pol_chem_def_sp = std::make_shared<PolChemDef>(pol_chem_def); |
289 |
|
|
|
290 |
1/2
✓ Branch 2 taken 36 times.
✗ Branch 3 not taken.
|
36 |
pol_chem_def_sp->setName(pol_chem_def_file_base_name); |
291 |
1/2
✓ Branch 2 taken 36 times.
✗ Branch 3 not taken.
|
36 |
pol_chem_def_sp->setXmlDataFilePath(pol_chem_def_absolute_file_path); |
292 |
|
|
|
293 |
7/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 36 times.
✗ Branch 24 not taken.
|
36 |
GIVEN("Loading isotopic data and polymer chemistry definition") |
294 |
|
|
{ |
295 |
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
|
36 |
std::size_t isotope_count = PolChemDef::loadIsotopicData(pol_chem_def_sp); |
296 |
1/2
✓ Branch 2 taken 36 times.
✗ Branch 3 not taken.
|
36 |
bool result = PolChemDef::renderXmlPolChemDefFile(pol_chem_def_sp); |
297 |
|
|
|
298 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
THEN( |
299 |
|
|
"Count the isotopes that have been loaded and check PolChemDef load was " |
300 |
|
|
"successful") |
301 |
|
|
{ |
302 |
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(isotope_count > 0); |
303 |
|
|
// qDebug() << "Loaded " << isotope_count << " isotopes" << std::endl; |
304 |
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 == true); |
305 |
|
36 |
} |
306 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
AND_THEN("The singular chemical entities are checked (end cap chemistry") |
307 |
|
|
{ |
308 |
8/20
✓ 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 20 taken 4 times.
✗ Branch 21 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
✓ Branch 30 taken 4 times.
✗ Branch 31 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 42 not taken.
✗ Branch 43 not taken.
|
4 |
REQUIRE(pol_chem_def_sp->name().toStdString() == |
309 |
|
|
pol_chem_def_name.toStdString()); |
310 |
8/20
✓ 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 20 taken 4 times.
✗ Branch 21 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
✓ Branch 29 taken 4 times.
✗ Branch 30 not taken.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
|
4 |
REQUIRE(pol_chem_def_sp->leftCap().toString().toStdString() == |
311 |
|
|
"\"N-term amine\" +H"); |
312 |
8/20
✓ 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 20 taken 4 times.
✗ Branch 21 not taken.
✓ Branch 23 taken 4 times.
✗ Branch 24 not taken.
✓ Branch 29 taken 4 times.
✗ Branch 30 not taken.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
|
4 |
REQUIRE(pol_chem_def_sp->rightCap().toString().toStdString() == |
313 |
|
|
"\"C-term carboxylic acid\" +OH"); |
314 |
|
36 |
} |
315 |
|
|
|
316 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
AND_THEN("And the ionization rule is checked") |
317 |
|
|
{ |
318 |
2/4
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 4 times.
✗ Branch 6 not taken.
|
4 |
IonizeRule ionize_rule = pol_chem_def_sp->ionizeRule(); |
319 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(ionize_rule.formula().toStdString() == "+H"); |
320 |
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(ionize_rule.charge() == 1); |
321 |
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(ionize_rule.level() == 1); |
322 |
|
40 |
} |
323 |
|
|
|
324 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
AND_THEN("And the code length is checked") |
325 |
|
|
{ |
326 |
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_sp->codeLength() == 1); |
327 |
|
36 |
} |
328 |
|
|
|
329 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
AND_THEN("The Monomer_s are checked") |
330 |
|
|
{ |
331 |
|
4 |
Monomer *monomer_p = nullptr; |
332 |
|
|
|
333 |
|
|
// Because of diaminopimelic acid, not 20, but 21. |
334 |
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_sp->monomerList().size() == 21); |
335 |
|
|
|
336 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
monomer_p = pol_chem_def_sp->monomerList().at(0); |
337 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->name().toStdString() == "Glycine"); |
338 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->code().toStdString() == "G"); |
339 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->formula().toStdString() == "C2H3N1O1"); |
340 |
|
|
|
341 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
monomer_p = pol_chem_def_sp->monomerList().at(4); |
342 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->name().toStdString() == "DiaminoPimelic"); |
343 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->code().toStdString() == "O"); |
344 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->formula().toStdString() == "C7H12N2O3"); |
345 |
|
|
|
346 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
monomer_p = pol_chem_def_sp->monomerList().at(12); |
347 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->name().toStdString() == "Aspartate"); |
348 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->code().toStdString() == "D"); |
349 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->formula().toStdString() == "C4H5N1O3"); |
350 |
|
|
|
351 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
monomer_p = pol_chem_def_sp->monomerList().at(20); |
352 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->name().toStdString() == "Proline"); |
353 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->code().toStdString() == "P"); |
354 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(monomer_p->formula().toStdString() == "C5H7N1O1"); |
355 |
|
36 |
} |
356 |
|
|
|
357 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
AND_THEN("The Modif_s are checked") |
358 |
|
|
{ |
359 |
|
4 |
Modif *modif_p = nullptr; |
360 |
|
|
|
361 |
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_sp->modifList().size() == 26); |
362 |
|
|
|
363 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
modif_p = pol_chem_def_sp->modifList().at(0); |
364 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "Acetylation"); |
365 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->formula().toStdString() == "C2H2O1"); |
366 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->targets().toStdString() == ";K;"); |
367 |
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(modif_p->maxCount() == 1); |
368 |
|
|
|
369 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
modif_p = pol_chem_def_sp->modifList().at(5); |
370 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "CarboxyMethylation"); |
371 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->formula().toStdString() == "C2H2O2"); |
372 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->targets().toStdString() == ";C;"); |
373 |
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(modif_p->maxCount() == 1); |
374 |
|
|
|
375 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
modif_p = pol_chem_def_sp->modifList().at(8); |
376 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "Chromo-H3"); |
377 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->formula().toStdString() == "-H3"); |
378 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->targets().toStdString() == ";Y;F;W;"); |
379 |
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(modif_p->maxCount() == 1); |
380 |
|
|
|
381 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
modif_p = pol_chem_def_sp->modifList().at(12); |
382 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "Formylation"); |
383 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->formula().toStdString() == "C1O1"); |
384 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->targets().toStdString() == "*"); |
385 |
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(modif_p->maxCount() == 1); |
386 |
|
|
|
387 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
modif_p = pol_chem_def_sp->modifList().at(15); |
388 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "Glycylation"); |
389 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->formula().toStdString() == "C2H3N1O1"); |
390 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->targets().toStdString() == ";E;"); |
391 |
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(modif_p->maxCount() == 34); |
392 |
|
|
|
393 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
modif_p = pol_chem_def_sp->modifList().at(20); |
394 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "Phosphorylation"); |
395 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->formula().toStdString() == "H1O3P1"); |
396 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->targets().toStdString() == ";S;T;Y;"); |
397 |
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(modif_p->maxCount() == 1); |
398 |
|
36 |
} |
399 |
|
|
|
400 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
AND_THEN("The CrossLinker_s are checked") |
401 |
|
|
{ |
402 |
|
4 |
CrossLinker *crossLinker_p = nullptr; |
403 |
|
4 |
QList<Modif *> modifList; |
404 |
|
4 |
Modif *modif_p = nullptr; |
405 |
|
|
|
406 |
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_sp->crossLinkerList().size() == 2); |
407 |
|
|
|
408 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
crossLinker_p = pol_chem_def_sp->crossLinkerList().at(0); |
409 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(crossLinker_p->name().toStdString() == "CFP-chromophore"); |
410 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(crossLinker_p->formula().toStdString() == ""); |
411 |
|
|
|
412 |
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
|
4 |
modifList = crossLinker_p->modifList(); |
413 |
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(modifList.size() == 3); |
414 |
|
|
|
415 |
|
4 |
modif_p = modifList.at(0); |
416 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "Chromo-O"); |
417 |
|
4 |
modif_p = modifList.at(1); |
418 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "Chromo-H3"); |
419 |
|
4 |
modif_p = modifList.at(2); |
420 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "Chromo-H"); |
421 |
|
|
|
422 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
crossLinker_p = pol_chem_def_sp->crossLinkerList().at(1); |
423 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(crossLinker_p->name().toStdString() == "DisulfideBond"); |
424 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(crossLinker_p->formula().toStdString() == ""); |
425 |
|
|
|
426 |
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
|
4 |
modifList = crossLinker_p->modifList(); |
427 |
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(modifList.size() == 2); |
428 |
|
|
|
429 |
|
4 |
modif_p = modifList.at(0); |
430 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "ProtonLoss"); |
431 |
|
4 |
modif_p = modifList.at(1); |
432 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(modif_p->name().toStdString() == "ProtonLoss"); |
433 |
|
40 |
} |
434 |
|
|
|
435 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
AND_THEN("The CleaveSpec_s are checked (and the CleaveRules_ if any)") |
436 |
|
|
{ |
437 |
|
4 |
CleaveSpec *cleave_spec_p = nullptr; |
438 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
QList<CleaveSpec *> cleave_spec_list = pol_chem_def_sp->cleaveSpecList(); |
439 |
|
|
|
440 |
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(cleave_spec_list.size() == 8); |
441 |
|
|
|
442 |
|
4 |
cleave_spec_p = cleave_spec_list.at(0); |
443 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(cleave_spec_p->name().toStdString() == "EndoAspN+GluN"); |
444 |
7/18
✓ 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 24 taken 4 times.
✗ Branch 25 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
|
4 |
REQUIRE(cleave_spec_p->pattern().toStdString() == "/D;/E"); |
445 |
|
|
|
446 |
|
4 |
cleave_spec_p = cleave_spec_list.at(3); |
447 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(cleave_spec_p->name().toStdString() == "EndoLysC"); |
448 |
7/18
✓ 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 24 taken 4 times.
✗ Branch 25 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
|
4 |
REQUIRE(cleave_spec_p->pattern().toStdString() == "K/"); |
449 |
|
|
|
450 |
|
4 |
cleave_spec_p = cleave_spec_list.at(6); |
451 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(cleave_spec_p->name().toStdString() == "CyanogenBromide"); |
452 |
7/18
✓ 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 24 taken 4 times.
✗ Branch 25 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
|
4 |
REQUIRE(cleave_spec_p->pattern().toStdString() == "M/"); |
453 |
|
|
|
454 |
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
|
4 |
CleaveRule *cleave_rule_p = cleave_spec_p->ruleList()->at(0); |
455 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(cleave_rule_p->name().toStdString() == "Homoseryl"); |
456 |
7/18
✓ 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 24 taken 4 times.
✗ Branch 25 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
|
4 |
REQUIRE(cleave_rule_p->rightCode().toStdString() == "M"); |
457 |
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(cleave_rule_p->rightFormula().toString().toStdString() == |
458 |
|
|
"-CH2S+O"); |
459 |
|
40 |
} |
460 |
|
|
|
461 |
8/14
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 36 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✓ Branch 21 taken 36 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 4 times.
✓ Branch 24 taken 32 times.
|
36 |
AND_THEN("The FragSpec_s are checked") |
462 |
|
|
{ |
463 |
|
4 |
FragSpec *frag_spec_p = nullptr; |
464 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
QList<FragSpec *> frag_spec_list = pol_chem_def_sp->fragSpecList(); |
465 |
|
|
|
466 |
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(frag_spec_list.size() == 7); |
467 |
|
|
|
468 |
|
4 |
frag_spec_p = frag_spec_list.at(0); |
469 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(frag_spec_p->name().toStdString() == "a"); |
470 |
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(frag_spec_p->fragEnd() == FragEnd::FRAG_END_LEFT); |
471 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(frag_spec_p->formula().toStdString() == "-C1O1H1"); |
472 |
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(frag_spec_p->monomerContribution() == 0); |
473 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(frag_spec_p->comment().toStdString() == ""); |
474 |
|
|
|
475 |
|
4 |
frag_spec_p = frag_spec_list.at(3); |
476 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(frag_spec_p->name().toStdString() == "z"); |
477 |
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(frag_spec_p->fragEnd() == FragEnd::FRAG_END_RIGHT); |
478 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(frag_spec_p->formula().toStdString() == "-N1H1"); |
479 |
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(frag_spec_p->monomerContribution() == 0); |
480 |
7/18
✓ 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 25 taken 4 times.
✗ Branch 26 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
|
4 |
REQUIRE(frag_spec_p->comment().toStdString() == |
481 |
|
|
"Typically in ECD of protonated ions"); |
482 |
|
40 |
} |
483 |
|
36 |
} |
484 |
|
36 |
} |
485 |
|
|
|
486 |
|
8 |
SCENARIO("Loading the same PolChemDef and writing it back") |
487 |
|
|
{ |
488 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
PolChemDef pol_chem_def; |
489 |
|
8 |
PolChemDefSPtr pol_chem_def_sp = nullptr; |
490 |
|
|
|
491 |
|
|
// We use polymer chemistry definitions copied to the |
492 |
|
|
// tests/data/polymer-chemistry-definitions directory. |
493 |
|
|
QString test_pol_chem_defs_dir = |
494 |
3/6
✓ 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.
|
16 |
QString("%1/polymer-chemistry-definitions").arg(TESTS_INPUT_DIR); |
495 |
|
|
|
496 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString pol_chem_def_name = "protein-1-letter"; |
497 |
|
|
QString pol_chem_def_file_base_name = |
498 |
2/4
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
|
16 |
QString("%1.xml").arg(pol_chem_def_name); |
499 |
|
|
|
500 |
|
|
// Relative is to one of the polChemDefs directory (in system or user |
501 |
|
|
// directory) |
502 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString pol_chem_def_relative_dir_path = "protein-1-letter"; |
503 |
|
|
|
504 |
|
|
QString pol_chem_def_relative_file_path = |
505 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString("%1/%2") |
506 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
16 |
.arg(pol_chem_def_relative_dir_path) |
507 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
.arg(pol_chem_def_file_base_name); |
508 |
|
|
|
509 |
|
|
QString pol_chem_def_isotopic_data_relative_file_path = |
510 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString("%1/%2/%3") |
511 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
16 |
.arg(pol_chem_def_relative_dir_path) |
512 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
16 |
.arg(pol_chem_def_file_base_name) |
513 |
2/4
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
|
8 |
.arg("isotopic-data.dat"); |
514 |
|
|
|
515 |
|
|
QString pol_chem_def_absolute_dir_path = |
516 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString("%1/%2") |
517 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
16 |
.arg(test_pol_chem_defs_dir) |
518 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
.arg(pol_chem_def_relative_dir_path); |
519 |
|
|
|
520 |
|
|
// qDebug() << "The dir: " << pol_chem_def_absolute_dir_path.toStdString() |
521 |
|
|
// << std::endl; |
522 |
|
|
|
523 |
|
|
QString pol_chem_def_absolute_file_path = |
524 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString("%1/%2") |
525 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
16 |
.arg(pol_chem_def_absolute_dir_path) |
526 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
.arg(pol_chem_def_file_base_name); |
527 |
|
|
|
528 |
|
|
QString pol_chem_def_isotopic_data_absolute_file_path = |
529 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString("%1/%2") |
530 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
16 |
.arg(pol_chem_def_absolute_dir_path) |
531 |
2/4
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
|
8 |
.arg("isotopic-data.dat"); |
532 |
|
|
|
533 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
pol_chem_def_sp = std::make_shared<PolChemDef>(pol_chem_def); |
534 |
|
|
|
535 |
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
|
8 |
pol_chem_def_sp->setName(pol_chem_def_file_base_name); |
536 |
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
|
8 |
pol_chem_def_sp->setXmlDataFilePath(pol_chem_def_absolute_file_path); |
537 |
|
|
|
538 |
1/2
✓ Branch 3 taken 8 times.
✗ Branch 4 not taken.
|
8 |
std::size_t isotope_count = PolChemDef::loadIsotopicData(pol_chem_def_sp); |
539 |
5/14
✓ 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 13 taken 8 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 8 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
|
8 |
REQUIRE(isotope_count == 288); |
540 |
|
|
|
541 |
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
|
8 |
bool result = PolChemDef::renderXmlPolChemDefFile(pol_chem_def_sp); |
542 |
5/14
✓ 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 13 taken 8 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 8 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
|
8 |
REQUIRE(result == true); |
543 |
|
|
|
544 |
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 fully loaded PolChemDef along with its IsotopicData") |
545 |
|
|
{ |
546 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString pol_chem_def_output_dir = QString("%1/%2/%3") |
547 |
2/4
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
|
16 |
.arg(TESTS_OUTPUT_DIR) |
548 |
2/4
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
|
16 |
.arg("polymer-chemistry-definitions") |
549 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
.arg(pol_chem_def_name); |
550 |
|
|
|
551 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
QString pol_chem_def_output_file_name = QString("%1/%2") |
552 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
16 |
.arg(pol_chem_def_output_dir) |
553 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
.arg(pol_chem_def_file_base_name); |
554 |
1/2
✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
|
8 |
QDir dir; |
555 |
1/2
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
|
8 |
bool result = dir.mkpath(pol_chem_def_output_dir); |
556 |
5/14
✓ 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 13 taken 8 times.
✗ Branch 14 not taken.
✓ Branch 17 taken 8 times.
✗ Branch 18 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
|
8 |
REQUIRE(result == true); |
557 |
|
|
|
558 |
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 |
WHEN("Writing that PolChemDef back to file") |
559 |
|
|
{ |
560 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
pol_chem_def_sp->setXmlDataFilePath(pol_chem_def_output_file_name); |
561 |
1/2
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
4 |
result = pol_chem_def_sp->writeXmlFile(); |
562 |
|
|
|
563 |
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 writing should be succesful") |
564 |
|
|
{ |
565 |
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 == true); |
566 |
|
4 |
} |
567 |
|
8 |
} |
568 |
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("Comparing original file and new one") |
569 |
|
|
{ |
570 |
1/2
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
|
4 |
int result = testDiffBetweenTwoTextFiles(pol_chem_def_absolute_file_path, |
571 |
|
|
pol_chem_def_output_file_name); |
572 |
|
|
|
573 |
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 files should be identical") |
574 |
|
|
{ |
575 |
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 == 0); |
576 |
|
4 |
} |
577 |
|
8 |
} |
578 |
|
16 |
} |
579 |
|
8 |
} |
580 |
|
|
|
581 |
|
|
|
582 |
|
|
} // namespace libXpertMass |
583 |
|
|
} // namespace MsXpS |
584 |
|
|
|