END_TEST START_TEST (test_L3_Event_useValuesFromTriggerTime) { fail_unless(Event_isSetUseValuesFromTriggerTime(E) == 0); Event_setUseValuesFromTriggerTime(E, 1); fail_unless(Event_getUseValuesFromTriggerTime(E) == 1); fail_unless(Event_isSetUseValuesFromTriggerTime(E) == 1); int ret = Event_unsetUseValuesFromTriggerTime(E); fail_unless(ret == LIBSBML_OPERATION_SUCCESS); fail_unless(Event_getUseValuesFromTriggerTime(E) == 1); fail_unless(Event_isSetUseValuesFromTriggerTime(E) == 0); Event_setUseValuesFromTriggerTime(E, 0); fail_unless(Event_getUseValuesFromTriggerTime(E) == 0); fail_unless(Event_isSetUseValuesFromTriggerTime(E) == 1); ret = Event_unsetUseValuesFromTriggerTime(E); fail_unless(ret == LIBSBML_OPERATION_SUCCESS); fail_unless(Event_getUseValuesFromTriggerTime(E) == 0); fail_unless(Event_isSetUseValuesFromTriggerTime(E) == 0); }
END_TEST START_TEST (test_L3_Event_useValuesFromTriggerTime) { fail_unless(Event_isSetUseValuesFromTriggerTime(E) == 0); Event_setUseValuesFromTriggerTime(E, 1); fail_unless(Event_getUseValuesFromTriggerTime(E) == 1); fail_unless(Event_isSetUseValuesFromTriggerTime(E) == 1); Event_setUseValuesFromTriggerTime(E, 0); fail_unless(Event_getUseValuesFromTriggerTime(E) == 0); fail_unless(Event_isSetUseValuesFromTriggerTime(E) == 1); }
END_TEST START_TEST (test_L3_Event_createWithNS ) { XMLNamespaces_t *xmlns = XMLNamespaces_create(); XMLNamespaces_add(xmlns, "http://www.sbml.org", "testsbml"); SBMLNamespaces_t *sbmlns = SBMLNamespaces_create(3,1); SBMLNamespaces_addNamespaces(sbmlns,xmlns); Event_t *e = Event_createWithNS (sbmlns); fail_unless( SBase_getTypeCode ((SBase_t *) e) == SBML_EVENT ); fail_unless( SBase_getMetaId ((SBase_t *) e) == NULL ); fail_unless( SBase_getNotes ((SBase_t *) e) == NULL ); fail_unless( SBase_getAnnotation((SBase_t *) e) == NULL ); fail_unless( SBase_getLevel ((SBase_t *) e) == 3 ); fail_unless( SBase_getVersion ((SBase_t *) e) == 1 ); fail_unless( Event_getNamespaces (e) != NULL ); fail_unless( XMLNamespaces_getLength(Event_getNamespaces(e)) == 2 ); fail_unless( Event_getId (e) == NULL ); fail_unless( Event_getName (e) == NULL ); fail_unless( Event_getUseValuesFromTriggerTime(e) == 1 ); fail_unless( !Event_isSetId (e) ); fail_unless( !Event_isSetName (e) ); fail_unless( !Event_isSetUseValuesFromTriggerTime(e) ); Event_free(e); XMLNamespaces_free(xmlns); SBMLNamespaces_free(sbmlns); }