ProteoWizard
Functions | Variables
SpectrumListFactoryTest.cpp File Reference
#include "SpectrumListFactory.hpp"
#include "pwiz/utility/misc/unit.hpp"
#include "pwiz/utility/misc/Std.hpp"
#include <cstring>

Go to the source code of this file.

Functions

void testUsage ()
 
void testWrap ()
 
void testWrapScanTimeRange ()
 
void testWrapSortScanTime ()
 
void testWrapMZWindow ()
 
void testWrapMSLevel ()
 
void testWrapChargeState ()
 
void testWrapDefaultArrayLength ()
 
void testWrapActivation ()
 
void testWrapMassAnalyzer ()
 
void testWrapPolarity ()
 
void testWrapTitleMaker ()
 
void test ()
 
int main (int argc, char *argv[])
 

Variables

ostream * os_ = 0
 

Function Documentation

void testUsage ( )

Definition at line 39 of file SpectrumListFactoryTest.cpp.

References os_, and pwiz::analysis::SpectrumListFactory::usage().

40 {
41  if (os_) *os_ << "SpectrumListFactory::usage():\n" << SpectrumListFactory::usage() << endl;
42 }
ostream * os_
void testWrap ( )

Definition at line 45 of file SpectrumListFactoryTest.cpp.

References pwiz::msdata::MSData::allDataProcessingPtrs(), pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, unit_assert_operator_equal, and pwiz::analysis::SpectrumListFactory::wrap().

46 {
47  MSData msd;
49 
51 
52  unit_assert(sl.get());
53  unit_assert(sl->size() > 2);
54 
55  // CompassXtract and pwiz data processing
57  unit_assert_operator_equal(1, msd.allDataProcessingPtrs()[1]->processingMethods.size());
58 
59  SpectrumListFactory::wrap(msd, "scanNumber [19,20]");
60  unit_assert(sl->size() == 2);
61 
62  // make sure we can handle config file lines copied from commandline
63  // with quotes intact
64  SpectrumListFactory::wrap(msd, "'index [1,1]'");
65  unit_assert(sl->size() == 1);
66  unit_assert(sl->spectrumIdentity(0).id == "scan=20");
67 
68  vector<double> profileData(sl->spectrum(0)->getMZArray()->data);
69  unit_assert(profileData.size() == 10);
70  unit_assert(profileData[0] == 0);
71  unit_assert(profileData[9] == 18);
72 
74  unit_assert_operator_equal(1, msd.allDataProcessingPtrs()[1]->processingMethods.size());
75 
76  SpectrumListFactory::wrap(msd, "peakPicking true [1,6]");
77 
78  vector<double> peakData(sl->spectrum(0)->getMZArray()->data);
79  unit_assert(peakData.size() == 1);
80  unit_assert(peakData[0] == 0);
81 
83  unit_assert_operator_equal(2, msd.allDataProcessingPtrs()[1]->processingMethods.size());
84 }
#define unit_assert_operator_equal(expected, actual)
Definition: unit.hpp:86
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
std::vector< DataProcessingPtr > allDataProcessingPtrs() const
return dataProcessingPtrs augmented by the dataProcessingPtr() set in SpectrumList and/or Chromatogra...
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapScanTimeRange ( )

Definition at line 87 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

88 {
89  MSData msd;
91 
93  unit_assert(sl.get());
94  unit_assert(sl->size() > 2);
95 
96  double timeHighInSeconds = 5.9 * 60; // between first and second scan
97  ostringstream oss;
98  oss << "scanTime [0," << timeHighInSeconds << "]";
99  SpectrumListFactory::wrap(msd, oss.str());
100  unit_assert(sl->size() == 2);
101  unit_assert(sl->spectrumIdentity(0).id == "scan=19");
102  unit_assert(sl->spectrumIdentity(1).id == "sample=1 period=1 cycle=23 experiment=1"); // not in scan time order (42 seconds)
103 }
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapSortScanTime ( )

Definition at line 106 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), MS_scan_start_time, pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, UO_minute, UO_second, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

107 {
108  MSData msd;
110 
112  unit_assert(sl.get());
113  unit_assert(sl->size() == 5);
114 
115  sl->spectrum(0)->scanList.scans[0].set(MS_scan_start_time, 35, UO_second);
116  sl->spectrum(2)->scanList.scans[0].set(MS_scan_start_time, 0.5, UO_minute);
117 
118  SpectrumListFactory::wrap(msd, "sortByScanTime");
119  unit_assert(sl->size() == 5);
120  unit_assert(sl->spectrumIdentity(0).id == "scan=21");
121  unit_assert(sl->spectrumIdentity(1).id == "scan=19");
122  unit_assert(sl->spectrumIdentity(2).id == "sample=1 period=1 cycle=23 experiment=1");
123 }
MS_scan_start_time
scan start time: The time that an analyzer started a scan, relative to the start of the MS run...
Definition: cv.hpp:140
UO_second
second: A time unit which is equal to the duration of 9 192 631 770 periods of the radiation correspo...
Definition: cv.hpp:9329
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
UO_minute
minute: A time unit which is equal to 60 seconds.
Definition: cv.hpp:9392
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapMZWindow ( )

Definition at line 126 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

127 {
128  MSData msd;
130 
132  unit_assert(sl.get() && sl->size()>2);
133  SpectrumPtr spectrum = sl->spectrum(0, true);
134  vector<MZIntensityPair> data;
135  spectrum->getMZIntensityPairs(data);
136  unit_assert(data.size() == 15);
137 
138  SpectrumListFactory::wrap(msd, "mzWindow [9.5,15]");
139 
140  spectrum = sl->spectrum(0, true);
141  spectrum->getMZIntensityPairs(data);
142  unit_assert(data.size() == 5);
143 
144  spectrum = sl->spectrum(1, true);
145  spectrum->getMZIntensityPairs(data);
146  unit_assert(data.size() == 3);
147 }
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: MSData.hpp:565
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapMSLevel ( )

Definition at line 150 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, unit_assert_operator_equal, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

151 {
152  MSData msd;
154 
156  unit_assert(sl.get());
157  unit_assert_operator_equal(5, sl->size());
158 
159  SpectrumListFactory::wrap(msd, "msLevel 2");
160  unit_assert_operator_equal(2, sl->size());
161  unit_assert_operator_equal("scan=20", sl->spectrumIdentity(0).id);
162 }
#define unit_assert_operator_equal(expected, actual)
Definition: unit.hpp:86
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapChargeState ( )

Definition at line 165 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert_operator_equal, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

166 {
167  {
168  MSData msd;
171 
172  SpectrumListFactory::wrap(msd, "chargeState 2");
173  unit_assert_operator_equal(2, sl->size());
174  unit_assert_operator_equal("scan=20", sl->spectrumIdentity(0).id);
175 
176  SpectrumListFactory::wrap(msd, "chargeState 1");
177  unit_assert_operator_equal(0, sl->size());
178  }
179 
180  {
181  MSData msd;
184 
185  SpectrumListFactory::wrap(msd, "chargeState 0-2");
186  unit_assert_operator_equal(2, sl->size());
187  unit_assert_operator_equal("scan=20", sl->spectrumIdentity(0).id);
188  }
189 }
#define unit_assert_operator_equal(expected, actual)
Definition: unit.hpp:86
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
void testWrapDefaultArrayLength ( )

Definition at line 192 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

193 {
194  // test that the minimum length is 1 (due to 0 being the "unset" value)
195  {
196  MSData msd;
198 
200  unit_assert(sl.get());
201  unit_assert(sl->size() == 5);
202 
203  SpectrumListFactory::wrap(msd, "defaultArrayLength 0-");
204  unit_assert(sl->size() == 4);
205  unit_assert(sl->find("scan=21") == sl->size());
206  }
207 
208  // test filtering out all spectra
209  {
210  MSData msd;
213 
214  SpectrumListFactory::wrap(msd, "defaultArrayLength 100-");
215  unit_assert(sl->size() == 0);
216  }
217 
218  // test filtering out empty spectra
219  {
220  MSData msd;
223 
224  SpectrumListFactory::wrap(msd, "defaultArrayLength 1-");
225  unit_assert(sl->size() == 4);
226  unit_assert(sl->find("scan=21") == sl->size());
227  }
228 
229  // test filtering out spectra with defaultArrayLength > 14
230  {
231  MSData msd;
234 
235  SpectrumListFactory::wrap(msd, "defaultArrayLength 15-");
236  unit_assert(sl->size() == 2);
237  unit_assert(sl->find("scan=20") == sl->size());
238  unit_assert(sl->find("scan=21") == sl->size());
239  }
240 
241  // test filtering out spectra with 0 < defaultArrayLength < 15
242  {
243  MSData msd;
246 
247  SpectrumListFactory::wrap(msd, "defaultArrayLength 1-14");
248  unit_assert(sl->size() == 2);
249  unit_assert(sl->find("scan=20") == 0);
250  }
251 }
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapActivation ( )

Definition at line 253 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, unit_assert_throws, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

254 {
255  // test filter by CID activation
256  {
257  MSData msd;
259  SpectrumListFactory::wrap(msd, "msLevel 2-");
260  SpectrumListFactory::wrap(msd, "activation CID");
261  unit_assert(msd.run.spectrumListPtr->size() == 1);
262  }
263  // test filter by ETD activation
264  {
265  MSData msd;
267  SpectrumListFactory::wrap(msd, "msLevel 2-");
268  SpectrumListFactory::wrap(msd, "activation ETD");
269  unit_assert(msd.run.spectrumListPtr->size() == 1);
270  }
271  // test filter by HCD activation
272  {
273  MSData msd;
275  SpectrumListFactory::wrap(msd, "msLevel 2-");
276  SpectrumListFactory::wrap(msd, "activation HCD");
277  unit_assert(msd.run.spectrumListPtr->size() == 0);
278  }
279  // test filter by IRMPD activation
280  {
281  MSData msd;
283  SpectrumListFactory::wrap(msd, "msLevel 2-");
284  SpectrumListFactory::wrap(msd, "activation IRMPD");
285  unit_assert(msd.run.spectrumListPtr->size() == 0);
286  }
287  // test invalid argument
288  {
289  MSData msd;
291 
292  unit_assert_throws(SpectrumListFactory::wrap(msd, "activation UNEXPECTED_INPUT"), runtime_error);
293  }
294 }
#define unit_assert_throws(x, exception)
Definition: unit.hpp:94
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapMassAnalyzer ( )

Definition at line 296 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, unit_assert_throws, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

297 {
298  // test filter by ITMS analyzer type
299  {
300  MSData msd;
302 
303  SpectrumListFactory::wrap(msd, "analyzerType ITMS");
304  unit_assert(msd.run.spectrumListPtr->size() == 5);
305  }
306  // test filter by ITMS analyzer type (new syntax)
307  {
308  MSData msd;
310 
311  SpectrumListFactory::wrap(msd, "analyzerType it");
312  unit_assert(msd.run.spectrumListPtr->size() == 5);
313  }
314  // test filter by FTMS analyzer type
315  {
316  MSData msd;
318 
319  SpectrumListFactory::wrap(msd, "analyzer FTMS");
320  unit_assert(msd.run.spectrumListPtr->size() == 0);
321  }
322  // test filter by Orbi analyzer type
323  {
324  MSData msd;
326 
327  SpectrumListFactory::wrap(msd, "analyzer Orbi");
328  unit_assert(msd.run.spectrumListPtr->size() == 0);
329  }
330  // test filter by TOF analyzer type
331  {
332  MSData msd;
334 
335  SpectrumListFactory::wrap(msd, "analyzer TOF");
336  unit_assert(msd.run.spectrumListPtr->size() == 0);
337  }
338  // test invalid argument
339  {
340  MSData msd;
342 
343  unit_assert_throws(SpectrumListFactory::wrap(msd, "analyzer UNEXPECTED_INPUT"), runtime_error)
344  }
345 }
#define unit_assert_throws(x, exception)
Definition: unit.hpp:94
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapPolarity ( )

Definition at line 347 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert, unit_assert_throws, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

348 {
349  // test filter by positive polarity
350  {
351  MSData msd;
353 
355  unit_assert(sl.get());
356  unit_assert(sl->size() == 5);
357 
358  SpectrumListFactory::wrap(msd, "polarity positive");
359  unit_assert(sl->size() == 3);
360  }
361  // test filter by + polarity
362  {
363  MSData msd;
365 
367  unit_assert(sl.get());
368  unit_assert(sl->size() == 5);
369 
370  SpectrumListFactory::wrap(msd, "polarity +");
371  unit_assert(sl->size() == 3);
372  }
373  // test filter by negative polarity
374  {
375  MSData msd;
377 
379  unit_assert(sl.get());
380  unit_assert(sl->size() == 5);
381 
382  SpectrumListFactory::wrap(msd, "polarity -");
383  unit_assert(sl->size() == 2);
384  }
385  // test invalid argument
386  {
387  MSData msd;
389 
391  unit_assert(sl.get());
392  unit_assert(sl->size() == 5);
393  unit_assert_throws(SpectrumListFactory::wrap(msd, "polarity UNEXPECTED_INPUT"), runtime_error)
394  }
395 }
#define unit_assert_throws(x, exception)
Definition: unit.hpp:94
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
#define unit_assert(x)
Definition: unit.hpp:82
void testWrapTitleMaker ( )

Definition at line 397 of file SpectrumListFactoryTest.cpp.

References pwiz::identdata::examples::initializeTiny(), MS_spectrum_title, pwiz::msdata::MSData::run, pwiz::msdata::Run::spectrumListPtr, unit_assert_operator_equal, and pwiz::analysis::SpectrumListFactory::wrap().

Referenced by test().

398 {
399  MSData msd;
401 
402  {
403  SpectrumListFactory::wrap(msd, "titleMaker <Id>");
405  unit_assert_operator_equal("scan=19", sl->spectrum(0)->cvParam(MS_spectrum_title).value);
406  unit_assert_operator_equal("scan=20", sl->spectrum(1)->cvParam(MS_spectrum_title).value);
407  unit_assert_operator_equal("scan=21", sl->spectrum(2)->cvParam(MS_spectrum_title).value);
408  unit_assert_operator_equal("scan=22", sl->spectrum(3)->cvParam(MS_spectrum_title).value);
409  unit_assert_operator_equal("sample=1 period=1 cycle=23 experiment=1", sl->spectrum(4)->cvParam(MS_spectrum_title).value);
410  }
411 
412  {
413  // the outer titleMaker overrides the inner one
414  SpectrumListFactory::wrap(msd, "titleMaker <Index>; <SpectrumType>, <MsLevel>");
416  unit_assert_operator_equal("0; MS1 spectrum, 1", sl->spectrum(0)->cvParam(MS_spectrum_title).value);
417  unit_assert_operator_equal("1; MSn spectrum, 2", sl->spectrum(1)->cvParam(MS_spectrum_title).value);
418  unit_assert_operator_equal("2; MS1 spectrum, 1", sl->spectrum(2)->cvParam(MS_spectrum_title).value);
419  unit_assert_operator_equal("3; MSn spectrum, 2", sl->spectrum(3)->cvParam(MS_spectrum_title).value);
420  unit_assert_operator_equal("4; MS1 spectrum, 1", sl->spectrum(4)->cvParam(MS_spectrum_title).value);
421  }
422 
423  {
424  SpectrumListFactory::wrap(msd, "titleMaker <ScanNumber> <MsLevel> <ActivationType> <ChargeState> <PrecursorSpectrumId>");
426  unit_assert_operator_equal("19 1 ", sl->spectrum(0)->cvParam(MS_spectrum_title).value);
427  unit_assert_operator_equal("20 2 CID 2 scan=19", sl->spectrum(1)->cvParam(MS_spectrum_title).value);
428  unit_assert_operator_equal("21 1 ", sl->spectrum(2)->cvParam(MS_spectrum_title).value);
429  unit_assert_operator_equal("22 2 ETD/CID 2 scan=19", sl->spectrum(3)->cvParam(MS_spectrum_title).value);
430  unit_assert_operator_equal("5 1 ", sl->spectrum(4)->cvParam(MS_spectrum_title).value);
431  }
432 }
#define unit_assert_operator_equal(expected, actual)
Definition: unit.hpp:86
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
Definition: MSData.hpp:887
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:712
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
Definition: MSData.hpp:828
MS_spectrum_title
spectrum title: A free-form text title describing a spectrum.
Definition: cv.hpp:2915
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:850
void test ( )

Definition at line 434 of file SpectrumListFactoryTest.cpp.

References testUsage(), testWrap(), testWrapActivation(), testWrapChargeState(), testWrapDefaultArrayLength(), testWrapMassAnalyzer(), testWrapMSLevel(), testWrapMZWindow(), testWrapPolarity(), testWrapScanTimeRange(), testWrapSortScanTime(), and testWrapTitleMaker().

435 {
436  testUsage();
437  testWrap();
441  testWrapMSLevel();
448 }
void testWrapScanTimeRange()
void testUsage()
void testWrapMassAnalyzer()
void testWrapTitleMaker()
void testWrapActivation()
void testWrap()
void testWrapDefaultArrayLength()
void testWrapMZWindow()
void testWrapMSLevel()
void testWrapChargeState()
void testWrapSortScanTime()
void testWrapPolarity()
int main ( int  argc,
char *  argv[] 
)

Definition at line 451 of file SpectrumListFactoryTest.cpp.

References os_, test(), TEST_EPILOG, TEST_FAILED, and TEST_PROLOG.

452 {
453  TEST_PROLOG(argc, argv)
454 
455  try
456  {
457  if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
458  test();
459  }
460  catch (exception& e)
461  {
462  TEST_FAILED(e.what())
463  }
464  catch (...)
465  {
466  TEST_FAILED("Caught unknown exception.")
467  }
468 
470 }
ostream * os_
#define TEST_EPILOG
Definition: unit.hpp:166
#define TEST_FAILED(x)
Definition: unit.hpp:160
#define TEST_PROLOG(argc, argv)
Definition: unit.hpp:158

Variable Documentation

ostream* os_ = 0

Definition at line 36 of file SpectrumListFactoryTest.cpp.