Ejemplo n.º 1
0
END_TEST


START_TEST (test_L3_Compartment_hasRequiredAttributes )
{
  Compartment_t *c = Compartment_create (3, 1);

  fail_unless ( !Compartment_hasRequiredAttributes(c));

  Compartment_setId(c, "id");

  fail_unless ( !Compartment_hasRequiredAttributes(c));

  Compartment_setConstant(c, 0);

  fail_unless ( Compartment_hasRequiredAttributes(c));

  Compartment_free(c);
}
Ejemplo n.º 2
0
END_TEST


START_TEST (test_SBMLConvert_convertToL3_compartment)
{
  SBMLDocument_t *d = SBMLDocument_createWithLevelAndVersion(2, 2);
  Model_t        *m = SBMLDocument_createModel(d);

  const char   *sid = "C";
  Compartment_t  *c = Model_createCompartment(m);
  Compartment_t *c1;

  Compartment_setId   ( c, sid );

  fail_unless( SBMLDocument_setLevelAndVersionNonStrict(d, 3, 1) == 1, NULL);

  c1 = Model_getCompartment(m, 0);

  fail_unless(Compartment_hasRequiredAttributes(c1) == 1);

  SBMLDocument_free(d);
}