30 #ifdef PWIZ_READER_THERMO 38 return bal::to_lower_copy(
BFS_STRING(bfs::path(rawpath).extension())) ==
".raw";
42 int main(
int argc,
char* argv[])
46 #if defined(PWIZ_READER_THERMO) && !defined(PWIZ_READER_THERMO_TEST_ACCEPT_ONLY) 47 const bool testAcceptOnly =
false;
49 const bool testAcceptOnly =
true;
54 #ifdef PWIZ_READER_THERMO 63 bool allInstrumentTestsPassed =
true;
64 for (
int i=0; i < (int) InstrumentModelType_Count; ++i)
66 InstrumentModelType model = (InstrumentModelType) i;
77 case InstrumentModelType_Tempus_TOF:
78 case InstrumentModelType_Element_2:
79 case InstrumentModelType_Element_XR:
80 case InstrumentModelType_Element_GD:
81 case InstrumentModelType_Delta_Plus_Advantage:
82 case InstrumentModelType_Delta_Plus_XP:
83 case InstrumentModelType_Neptune:
84 case InstrumentModelType_Triton:
94 vector<IonizationType> ionizationTypes = getIonSourcesForInstrumentModel(model);
98 case InstrumentModelType_Element_XR:
99 case InstrumentModelType_Element_2:
100 case InstrumentModelType_Delta_Plus_Advantage:
101 case InstrumentModelType_Delta_Plus_XP:
102 case InstrumentModelType_Neptune:
103 case InstrumentModelType_Tempus_TOF:
104 case InstrumentModelType_Triton:
105 case InstrumentModelType_MAT253:
106 case InstrumentModelType_MAT900XP:
107 case InstrumentModelType_MAT900XP_Trap:
108 case InstrumentModelType_MAT95XP:
109 case InstrumentModelType_MAT95XP_Trap:
110 case InstrumentModelType_Surveyor_PDA:
111 case InstrumentModelType_Accela_PDA:
121 vector<MassAnalyzerType> massAnalyzerTypes = getMassAnalyzersForInstrumentModel(model);
125 case InstrumentModelType_Element_XR:
126 case InstrumentModelType_Element_2:
127 case InstrumentModelType_Element_GD:
128 case InstrumentModelType_Delta_Plus_Advantage:
129 case InstrumentModelType_Delta_Plus_XP:
130 case InstrumentModelType_Neptune:
131 case InstrumentModelType_Triton:
132 case InstrumentModelType_Surveyor_PDA:
133 case InstrumentModelType_Accela_PDA:
143 vector<DetectorType> detectorTypes = getDetectorsForInstrumentModel(model);
147 case InstrumentModelType_Element_GD:
148 case InstrumentModelType_Element_XR:
149 case InstrumentModelType_Element_2:
150 case InstrumentModelType_Delta_Plus_Advantage:
151 case InstrumentModelType_Delta_Plus_XP:
152 case InstrumentModelType_Neptune:
153 case InstrumentModelType_Tempus_TOF:
154 case InstrumentModelType_Triton:
155 case InstrumentModelType_MAT253:
156 case InstrumentModelType_MAT900XP:
157 case InstrumentModelType_MAT900XP_Trap:
158 case InstrumentModelType_MAT95XP:
159 case InstrumentModelType_MAT95XP_Trap:
169 BOOST_FOREACH(MassAnalyzerType realType, massAnalyzerTypes)
171 bool hasCorrespondingScanFilterType =
false;
172 for (
int j=0; j < (int) ScanFilterMassAnalyzerType_Count; ++j)
173 if (convertScanFilterMassAnalyzer((ScanFilterMassAnalyzerType) j, model) == realType)
174 hasCorrespondingScanFilterType =
true;
178 catch (runtime_error& e)
180 cerr <<
"Unit test failed for instrument model " <<
lexical_cast<
string>(model) <<
":\n" << e.what() << endl;
181 allInstrumentTestsPassed =
false;
188 bool requireUnicodeSupport =
true;
PWIZ_API_DECL CVID translateAsInstrumentModel(InstrumentModelType instrumentModelType)
A component of an instrument corresponding to a source (i.e. ion source), an analyzer (i...
bool operator()(const string &rawpath) const
returns true iff the given rawpath is a real path to test/generate
float lexical_cast(const std::string &str)
int main(int argc, char *argv[])
PWIZ_API_DECL std::vector< InstrumentConfiguration > createInstrumentConfigurations(pwiz::vendor_api::Bruker::CompassDataPtr rawfile)
PWIZ_API_DECL int testReader(const pwiz::msdata::Reader &reader, const std::vector< std::string > &args, bool testAcceptOnly, bool requireUnicodeSupport, const TestPathPredicate &isPathTestable)
A common test harness for vendor readers;.
test implementations derive from this to define which paths should be tested
#define TEST_PROLOG(argc, argv)