| 138 | TOLERANCE_RELATIVE(1.0005) |
| 139 | |
| 140 | START_SECTION(void load(const String& filename, MapType& map)) |
| 141 | { |
| 142 | MSExperiment exp; |
| 143 | SqMassFile().load(OPENMS_GET_TEST_DATA_PATH("SqliteMassFile_1.sqMass"), exp); |
| 144 | |
| 145 | MSExperiment exp2; |
| 146 | MzMLFile().load(OPENMS_GET_TEST_DATA_PATH("MzMLSqliteHandler_1.mzML"),exp2); |
| 147 | |
| 148 | TEST_EQUAL(exp.getNrSpectra(), exp2.getSpectra().size()) |
| 149 | TEST_EQUAL(exp.getNrChromatograms(), exp2.getChromatograms().size()) |
| 150 | TEST_EQUAL(exp.getNrSpectra(), 2) |
| 151 | TEST_EQUAL(exp.getNrChromatograms(), 1) |
| 152 | TEST_EQUAL(exp.getSpectrum(0) == exp2.getSpectra()[0], false) // no exact duplicate |
| 153 | |
| 154 | cout.precision(17); |
| 155 | |
| 156 | // Logic of comparison: if the absolute difference criterion is fulfilled, |
| 157 | // the relative one does not matter. If the absolute difference is larger |
| 158 | // than allowed, the test does not fail if the relative difference is less |
| 159 | // than allowed. |
| 160 | // Note that the sample spectrum intensity has a very large range, from |
| 161 | // 0.00013 to 183 838 intensity and encoding both values with high accuracy |
| 162 | // is difficult. |
| 163 | |
| 164 | cmpDataIntensity(exp, exp2, 1e-4, 1.001); |
| 165 | cmpDataMZ(exp, exp2, 1e-5, 1.000001); // less than 1ppm error for m/z |
| 166 | cmpDataRT(exp, exp2, 0.05, 1.000001); // max 0.05 seconds error in RT |
| 167 | |
| 168 | // mapping of experimental settings ... |
| 169 | TEST_EQUAL(exp.getExperimentalSettings() == (OpenMS::ExperimentalSettings)exp2, true) |
| 170 | TEST_EQUAL(exp.getSqlRunID(), exp2.getSqlRunID()) |
| 171 | |
| 172 | } |
| 173 | END_SECTION |
| 174 | |
| 175 | // reset error tolerances to default values |
no test coverage detected