END_TEST START_TEST (test_L3_Species_hasRequiredAttributes ) { Species_t *s = Species_create (3, 1); fail_unless ( !Species_hasRequiredAttributes(s)); Species_setId(s, "id"); fail_unless ( !Species_hasRequiredAttributes(s)); Species_setCompartment(s, "cell"); fail_unless ( !Species_hasRequiredAttributes(s)); Species_setHasOnlySubstanceUnits(s, 0); fail_unless ( !Species_hasRequiredAttributes(s)); Species_setBoundaryCondition(s, 0); fail_unless ( !Species_hasRequiredAttributes(s)); Species_setConstant(s, 0); fail_unless ( Species_hasRequiredAttributes(s)); Species_free(s); }
END_TEST START_TEST (test_SBMLConvert_convertToL3_species) { SBMLDocument_t *d = SBMLDocument_createWithLevelAndVersion(2, 2); Model_t *m = SBMLDocument_createModel(d); const char *sid = "C"; Species_t *s = Model_createSpecies(m); Species_t *s1; Species_setId ( s, sid ); Species_setCompartment( s, "comp"); fail_unless( SBMLDocument_setLevelAndVersionNonStrict(d, 3, 1) == 1, NULL); s1 = Model_getSpecies(m, 0); fail_unless(Species_hasRequiredAttributes(s1) == 1); SBMLDocument_free(d); }