EmpiricalFormula e2("(12)C5(13)C4"); EmpiricalFormula e3("C9"); TEST_REAL_SIMILAR(e1.getMonoWeight(), e2.getMonoWeight()) TEST_REAL_SIMILAR(e1.getMonoWeight(), 112.013419) TEST_REAL_SIMILAR(e2.getMonoWeight(), 112.013419) END_SECTION START_SECTION(EmpiricalFormula(const EmpiricalFormula& rhs)) EmpiricalFormula ef(*e_ptr); TEST_EQUAL(ef == *e_ptr, true) END_SECTION START_SECTION((EmpiricalFormula(SignedSize number, const Element* element, SignedSize charge=0))) EmpiricalFormula ef(4, db->getElement("C")); TEST_EQUAL(ef == *e_ptr, true) TEST_EQUAL(ef.getCharge(), 0) END_SECTION START_SECTION(const Element* getElement(UInt atomic_number) const) const Element* e = db->getElement(6); TEST_EQUAL(e->getSymbol(), "C") END_SECTION START_SECTION(const Element* getElement(const String& name) const) const Element* e = db->getElement("C"); TEST_EQUAL(e->getSymbol(), "C") END_SECTION START_SECTION(SignedSize getNumberOf(const Element* element) const) Size num1 = e_ptr->getNumberOf(db->getElement(6)); TEST_EQUAL(num1, 4);