37 if (
os_) (*os_) <<
"\ntestCVMap()\n";
40 "/mzIdentML/AnalysisSampleCollection/Sample/cvParam");
50 if (
os_) (*os_) <<
"\ntestRegexCVMap()\n";
53 "/mzIdentML/AnalysisSampleCollection/Sample/cvParam");
66 if (
os_) (*os_) <<
"\ntestCVMapIO()\n";
69 "/mzIdentML/AnalysisSampleCollection/Sample/cvParam");
74 if (
os_) (*os_) <<
"insertion operator:\n" << ss.str();
75 unit_assert(ss.str() ==
"plain\tsample name\tMS:1000002" 76 "\t/mzIdentML/AnalysisSampleCollection/Sample/cvParam\n");
82 if (
os_) (*os_) <<
"NULL pointer returned?" 83 << (cvmPtr.get() == NULL) << endl;
86 if (
os_) (*os_) <<
typeid(cvmPtr.get()).name() << endl;
89 if (
os_) (*os_) <<
"keyword: " << cvmPtr->keyword << endl;
90 if (
os_) (*os_) <<
"cvid: " << cvmPtr->cvid << endl;
97 if (
os_) (*os_) <<
"\ntestRegexCVMapIO()\n";
100 "/mzIdentML/AnalysisSampleCollection/Sample/cvParam");
105 if (
os_) (*os_) <<
"insertion operator:\n" << ss.str();
106 unit_assert(ss.str() ==
"regex\t[Ss]ample [Nn]ame\tMS:1000002\t" 107 "/mzIdentML/AnalysisSampleCollection/Sample/cvParam\n");
113 if (
os_) (*os_) <<
"NULL pointer returned?" 114 << (cvmPtr.get() == NULL) << endl;
117 if (
os_) (*os_) <<
typeid(cvmPtr.get()).name() << endl;
120 if (
os_) (*os_) <<
"keyword: " << cvmPtr->keyword << endl;
121 if (
os_) (*os_) <<
"cvid: " << cvmPtr->cvid << endl;
122 unit_assert(cvmPtr->keyword ==
"[Ss]ample [Nn]ame");
128 if (
os_) (*os_) <<
"\ntestVectorIO()\n";
131 "plain\tsample name\tMS:1000002\t/mzIdentML/AnalysisSampleCollection/Sample/cvParam\n" 132 "regex\t[Aa]ccuracy[ ]*\tMS:1000014\t/mzIdentML\n" 133 "regex\t[Ss]can start time[\\.]?\tMS:1000016\t/mzIdentML\n";
135 if (
os_) (*os_) <<
"file used:\n" << file << endl;
136 istringstream iss(file);
138 vector<CVMapPtr> mappings;
141 if (
os_) (*os_) <<
"Records read in:\n";
142 for (vector<CVMapPtr>::iterator i=mappings.begin(); i!=mappings.end(); i++)
144 if (
os_) (*os_) << *i;
153 if (
os_) (*os_) <<
"\nResulting vector output:\n";
154 if (
os_) (*os_) << oss.str() << endl;
167 int main(
int argc,
char* argv[])
173 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
MS_sample_name
sample name: A reference string relevant to the sample under study.
boost::shared_ptr< CVMap > CVMapPtr
int main(int argc, char *argv[])
#define TEST_PROLOG(argc, argv)