p.setPosition(pos); TEST_REAL_SIMILAR(p.getPosition()[0], 1.0) END_SECTION START_SECTION((PositionType& getPosition())) Peak1D::PositionType pos; pos[0] = 1.0; Peak1D p; p.getPosition() = pos; TEST_REAL_SIMILAR(p.getPosition()[0], 1.0) END_SECTION START_SECTION((void setMZ(CoordinateTypemz))) Peak1D p; p.setMZ(5.0); TEST_REAL_SIMILAR(p.getMZ(), 5.0) END_SECTION START_SECTION((void setPos(CoordinateTypepos))) Peak1D p; p.setPos(5.0); TEST_REAL_SIMILAR(p.getPos(), 5.0) END_SECTION START_SECTION((Peak1D(const Peak1D& p))) Peak1D::PositionType pos; pos[0] = 21.21; Peak1D p; p.setIntensity(123.456f); p.setPosition(pos); Peak1D::PositionType pos2;
Peak1D p1_9; p1_9.setIntensity(7.38493077109f); p1_9.setMZ(1000); mt1.peaks.push_back(std::make_pair(679.5 , &p1_9)); Peak1D p1_10; p1_10.setIntensity(7.84158938645f); p1_10.setMZ(1000); mt1.peaks.push_back(std::make_pair(679.8 , &p1_10)); START_SECTION(([FeatureFinderAlgorithmPickedHelperStructs::MassTrace] ConvexHull2D getConvexhull() const )) { ConvexHull2D ch = mt1.getConvexhull(); DPosition<2> point; point[0] = 679.8; point[1] = p1_10.getMZ(); TEST_EQUAL(ch.encloses(point),true); point[1] = p1_10.getMZ() + 1.0; TEST_EQUAL(ch.encloses(point),false); point[1] = p1_10.getMZ(); point[0] = 679.9; TEST_EQUAL(ch.encloses(point),false); } END_SECTION START_SECTION(([FeatureFinderAlgorithmPickedHelperStructs::MassTrace] void updateMaximum())) { mt1.updateMaximum();