END_TEST


START_TEST ( test_Constraint_parent_NULL )
{
    SBMLDocument *d = new SBMLDocument();
    Model *m = d->createModel();
    Constraint *c = m->createConstraint();

    Constraint *c1 = c->clone();
    delete d;

    fail_unless(c1->getAncestorOfType(SBML_MODEL) == NULL);
    fail_unless(c1->getParentSBMLObject() == NULL);
    fail_unless (c1->getSBMLDocument() == NULL);

    delete c1;
}
Пример #2
0
void Solver::addConstraint(const Constraint& constraint)
{
    _constraints.push_back(constraint.clone());
}