tmp.getOptions() = PeakFileOptions(); TEST_EQUAL(tmp.loadExperiment(OPENMS_GET_TEST_DATA_PATH("MzXMLFile_1.mzXML"), exp), true) TEST_REAL_SIMILAR(exp[2][0].getPosition()[0], 100) TEST_REAL_SIMILAR(exp[2][1].getPosition()[0], 110) TEST_REAL_SIMILAR(exp[2][2].getPosition()[0], 120) tmp.getOptions().setMZRange(DRange<1>(115, 1000)); TEST_EQUAL(tmp.loadExperiment(OPENMS_GET_TEST_DATA_PATH("MzXMLFile_1.mzXML"), exp), true) TEST_REAL_SIMILAR(exp[2][0].getPosition()[0], 120) TEST_REAL_SIMILAR(exp[2][1].getPosition()[0], 130) TEST_REAL_SIMILAR(exp[2][2].getPosition()[0], 140) tmp.getOptions() = PeakFileOptions(); TEST_EQUAL(tmp.loadExperiment(OPENMS_GET_TEST_DATA_PATH("MzMLFile_1.mzML"), exp), true) TEST_EQUAL(exp.size(), 4) TEST_STRING_EQUAL(exp.getSourceFiles()[0].getChecksum(), "310e4e89e3caa41ff6d79ee578522f47514ba9d6") TEST_EQUAL(exp.getSourceFiles()[0].getChecksumType(), SourceFile::SHA1) tmp.getOptions() = PeakFileOptions(); TEST_EQUAL(tmp.loadExperiment(OPENMS_GET_TEST_DATA_PATH("DTA2DFile_test_1.dta2d"), exp), true) TEST_REAL_SIMILAR(exp[0][0].getPosition()[0], 230.02) TEST_REAL_SIMILAR(exp[0][1].getPosition()[0], 430.02) TEST_REAL_SIMILAR(exp[0][2].getPosition()[0], 630.02) tmp.getOptions().setMZRange(DRange<1>(300, 1000)); TEST_EQUAL(tmp.loadExperiment(OPENMS_GET_TEST_DATA_PATH("DTA2DFile_test_1.dta2d"), exp), true) TEST_REAL_SIMILAR(exp[0][0].getPosition()[0], 430.02) TEST_REAL_SIMILAR(exp[0][1].getPosition()[0], 630.02) TEST_STRING_EQUAL(exp.getSourceFiles()[0].getChecksum(), "d50d5144cc3805749b9e8d16f3bc8994979d8142") TEST_EQUAL(exp.getSourceFiles()[0].getChecksumType(), SourceFile::SHA1)
TEST_REAL_SIMILAR(e[2].getFloatDataArrays()[4][4], 100) TEST_REAL_SIMILAR(e[2].getFloatDataArrays()[3][4], 100) TEST_EQUAL(e[2].getFloatDataArrays()[5][4], 100) TEST_REAL_SIMILAR(e[2].getFloatDataArrays()[0][4], 100) TEST_REAL_SIMILAR(e[2].getFloatDataArrays()[7][4], 100) TEST_EQUAL(e[2].getFloatDataArrays()[6][4], 100) //--------------------------------------------------------------------------- // accession number //--------------------------------------------------------------------------- TEST_EQUAL(e.getIdentifier(), "lsid"); //--------------------------------------------------------------------------- // source file //--------------------------------------------------------------------------- TEST_EQUAL(e.getSourceFiles().size(), 1) TEST_STRING_EQUAL(e.getSourceFiles()[0].getNameOfFile(), "MzDataFile_test_1.raw"); TEST_STRING_EQUAL(e.getSourceFiles()[0].getPathToFile(), "/share/data/"); TEST_STRING_EQUAL(e.getSourceFiles()[0].getFileType(), "MS"); TEST_STRING_EQUAL(e.getSourceFiles()[0].getChecksum(), ""); TEST_EQUAL(e.getSourceFiles()[0].getChecksumType(), SourceFile::UNKNOWN_CHECKSUM); //--------------------------------------------------------------------------- // conteact list //--------------------------------------------------------------------------- TEST_EQUAL(e.getContacts().size(), 2); ABORT_IF(e.getContacts().size() != 2); TEST_EQUAL(e.getContacts()[0].getFirstName(), "John"); TEST_EQUAL(e.getContacts()[0].getLastName(), "Doe"); TEST_EQUAL(e.getContacts()[0].getInstitution(), "department 1"); TEST_EQUAL(e.getContacts()[0].getContactInfo(), "www.john.doe");