END_TEST START_TEST (test_Compartment_getsetType) { Compartment_setCompartmentType(C, "cell"); fail_unless( !strcmp(Compartment_getCompartmentType(C), "cell" )); fail_unless( Compartment_isSetCompartmentType(C) ); Compartment_unsetCompartmentType(C); fail_unless( !Compartment_isSetCompartmentType(C) ); }
END_TEST START_TEST (test_Compartment_setCompartmentType4) { Compartment_t *c = Compartment_create(2, 2); int i = Compartment_setCompartmentType(c, NULL); fail_unless( i == LIBSBML_OPERATION_SUCCESS ); fail_unless( !Compartment_isSetCompartmentType(c) ); Compartment_free(c); }
END_TEST START_TEST (test_Compartment_setCompartmentType2) { Compartment_t *c = Compartment_create(2, 2); int i = Compartment_setCompartmentType(c, "1cell"); fail_unless( i == LIBSBML_INVALID_ATTRIBUTE_VALUE ); fail_unless( !Compartment_isSetCompartmentType(c) ); i = Compartment_unsetCompartmentType(c); fail_unless( i == LIBSBML_OPERATION_SUCCESS ); fail_unless( !Compartment_isSetCompartmentType(c) ); Compartment_free(c); }
END_TEST START_TEST (test_Compartment_setCompartmentType3) { Compartment_t *c = Compartment_create(2, 2); int i = Compartment_setCompartmentType(c, "cell"); fail_unless( i == LIBSBML_OPERATION_SUCCESS ); fail_unless( Compartment_isSetCompartmentType(c) ); fail_unless( !strcmp(Compartment_getCompartmentType(c), "cell" )); i = Compartment_unsetCompartmentType(c); fail_unless( i == LIBSBML_OPERATION_SUCCESS ); fail_unless( !Compartment_isSetCompartmentType(c) ); Compartment_free(c); }