30 #include "boost/logic/tribool.hpp"
33 using namespace pwiz::util;
35 using namespace pwiz::msdata;
36 using namespace pwiz::analysis;
37 using boost::logic::tribool;
47 return boost::logic::indeterminate;
54 return boost::logic::indeterminate;
64 return boost::logic::indeterminate;
73 return boost::logic::indeterminate;
100 *
os_ <<
"Original spectrum list (" << originalList->size() <<
"):\n";
102 write(*originalList);
108 *
os_ <<
"Default array length sorted spectrum list (" << defaultArrayLengthSortedList->size() <<
"):\n";
110 write(*defaultArrayLengthSortedList);
116 *
os_ <<
"MS level unstable sorted spectrum list (" << msLevelUnstableSortedList->size() <<
"):\n";
118 write(*msLevelUnstableSortedList);
124 *
os_ <<
"MS level stable sorted spectrum list (" << msLevelStableSortedList->size() <<
"):\n";
126 write(*msLevelStableSortedList);
132 *
os_ <<
"Silly (nested) sorted spectrum list (" << sillySortedList->size() <<
"):\n";
134 write(*sillySortedList);
154 s = originalList->spectrum(0);
165 s = defaultArrayLengthSortedList->spectrum(0);
168 s = defaultArrayLengthSortedList->spectrum(1);
171 s = defaultArrayLengthSortedList->spectrum(2);
173 s = defaultArrayLengthSortedList->spectrum(3);
175 for (
size_t i=1, end=defaultArrayLengthSortedList->size(); i < end; ++i)
176 unit_assert(defaultArrayLengthSortedList->spectrum(i)->defaultArrayLength >=
177 defaultArrayLengthSortedList->spectrum(i-1)->defaultArrayLength);
185 s = msLevelUnstableSortedList->spectrum(0);
187 s = msLevelUnstableSortedList->spectrum(1);
189 s = msLevelUnstableSortedList->spectrum(2);
191 s = msLevelUnstableSortedList->spectrum(3);
204 s = msLevelStableSortedList->spectrum(0);
207 s = msLevelStableSortedList->spectrum(1);
210 s = msLevelStableSortedList->spectrum(2);
213 s = msLevelStableSortedList->spectrum(3);
224 s = sillySortedList->spectrum(0);
227 s = sillySortedList->spectrum(1);
230 s = sillySortedList->spectrum(2);
232 s = sillySortedList->spectrum(3);
234 for (
size_t i=1, end=sillySortedList->size(); i < end; ++i)
235 unit_assert(sillySortedList->spectrum(i)->defaultArrayLength >=
236 sillySortedList->spectrum(i-1)->defaultArrayLength);
240 int main(
int argc,
char* argv[])
246 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;