START_SECTION(const String& getId() const) NOT_TESTABLE END_SECTION START_SECTION(void setFullName(const String &full_name)) ptr->setFullName("blubb_new_full_name"); TEST_STRING_EQUAL(ptr->getFullName(), "blubb_new_full_name") END_SECTION START_SECTION(const String& getFullName() const) NOT_TESTABLE END_SECTION START_SECTION(void setName(const String &name)) ptr->setName("blubb_new_name"); TEST_STRING_EQUAL(ptr->getName(), "blubb_new_name") END_SECTION START_SECTION(const String& getName() const) NOT_TESTABLE END_SECTION START_SECTION((void setNeutralLossDiffFormula(const EmpiricalFormula& loss))) ptr->setNeutralLossDiffFormula(EmpiricalFormula("H2O2")); TEST_EQUAL(ptr->getNeutralLossDiffFormula() == EmpiricalFormula("H2O2"), true) END_SECTION START_SECTION(const EmpiricalFormula& getNeutralLossDiffFormula() const) NOT_TESTABLE END_SECTION
END_SECTION ptr = new BinnedSharedPeakCount(); START_SECTION((BinnedSharedPeakCount(const BinnedSharedPeakCount &source))) { BinnedSharedPeakCount copy(*ptr); TEST_EQUAL(copy.getName(), ptr->getName()); TEST_EQUAL(copy.getParameters(), ptr->getParameters()); } END_SECTION START_SECTION((BinnedSharedPeakCount& operator=(const BinnedSharedPeakCount &source))) { BinnedSharedPeakCount copy; copy = *ptr; TEST_EQUAL(copy.getName(), ptr->getName()); TEST_EQUAL(copy.getParameters(), ptr->getParameters()); } END_SECTION START_SECTION((double operator()(const BinnedSpectrum &spec1, const BinnedSpectrum &spec2) const)) { PeakSpectrum s1, s2; DTAFile().load(OPENMS_GET_TEST_DATA_PATH("PILISSequenceDB_DFPIANGER_1.dta"), s1); DTAFile().load(OPENMS_GET_TEST_DATA_PATH("PILISSequenceDB_DFPIANGER_1.dta"), s2); s2.pop_back(); BinnedSpectrum bs1 (1.5,2,s1); BinnedSpectrum bs2 (1.5,2,s2); double score = (*ptr)(bs1, bs2); TEST_REAL_SIMILAR(score,0.997118)
ThresholdMower* e_nullPointer = 0; START_SECTION((ThresholdMower())) e_ptr = new ThresholdMower; TEST_NOT_EQUAL(e_ptr, e_nullPointer) END_SECTION START_SECTION((~ThresholdMower())) delete e_ptr; END_SECTION e_ptr = new ThresholdMower(); START_SECTION((ThresholdMower(const ThresholdMower& source))) ThresholdMower copy(*e_ptr); TEST_EQUAL(copy.getParameters(), e_ptr->getParameters()) TEST_EQUAL(copy.getName(), e_ptr->getName()) END_SECTION START_SECTION((ThresholdMower& operator=(const ThresholdMower& source))) ThresholdMower copy; copy = *e_ptr; TEST_EQUAL(copy.getParameters(), e_ptr->getParameters()) TEST_EQUAL(copy.getName(), e_ptr->getName()); END_SECTION START_SECTION((template<typename SpectrumType> void filterSpectrum(SpectrumType& spectrum))) DTAFile dta_file; PeakSpectrum spec; dta_file.load(OPENMS_GET_TEST_DATA_PATH("Transformers_tests.dta"), spec); TEST_EQUAL(spec.size(), 121)
START_SECTION([EXTRA](virtual ~HMMState())) delete state_ptr; END_SECTION state_ptr = nullptr; START_SECTION([EXTRA](HMMState(const String& name, bool hidden = true))) state_ptr = new HMMState("state_name_hidden", true); TEST_NOT_EQUAL(state_ptr, state_nullPointer) state_ptr2 = new HMMState("state_name_emitting", false); TEST_NOT_EQUAL(state_ptr2, state_nullPointer) END_SECTION START_SECTION([EXTRA](const String& getName() const)) TEST_EQUAL(state_ptr->getName(), "state_name_hidden"); TEST_EQUAL(state_ptr2->getName(), "state_name_emitting"); END_SECTION START_SECTION([EXTRA](bool isHidden() const)) TEST_EQUAL(state_ptr->isHidden(), true) TEST_EQUAL(state_ptr2->isHidden(), false) END_SECTION START_SECTION([EXTRA](void setName(const String& name))) state_ptr->setName("state_name_hidden2"); TEST_EQUAL(state_ptr->getName(), "state_name_hidden2") state_ptr->setName("state_name_hidden"); END_SECTION START_SECTION([EXTRA](void setHidden(bool hidden)))