int
main (void) 
{ 
  int num_failed;

  setTestDataDirectory();

  SRunner *runner = srunner_create( create_suite_Point() );

  srunner_add_suite( runner, create_suite_Dimensions            () );
  srunner_add_suite( runner, create_suite_BoundingBox           () );
  srunner_add_suite( runner, create_suite_LineSegment           () );
  srunner_add_suite( runner, create_suite_CubicBezier           () );
  srunner_add_suite( runner, create_suite_Curve                 () );
  srunner_add_suite( runner, create_suite_GraphicalObject       () );
  srunner_add_suite( runner, create_suite_CompartmentGlyph      () );
  srunner_add_suite( runner, create_suite_SpeciesGlyph          () );
  srunner_add_suite( runner, create_suite_ReactionGlyph         () );
  srunner_add_suite( runner, create_suite_SpeciesReferenceGlyph () );
  srunner_add_suite( runner, create_suite_TextGlyph             () );
  srunner_add_suite( runner, create_suite_Layout                () );
  srunner_add_suite( runner, create_suite_LayoutCreation        () );
  srunner_add_suite( runner, create_suite_LayoutFormatter       () );
  srunner_add_suite( runner, create_suite_SBMLHandler           () );
  srunner_add_suite( runner, create_suite_LayoutWriting         () );
 /* srunner_add_suite( runner, create_suite_Misc                  () ); */


#ifdef TRACE_MEMORY
  srunner_set_fork_status(runner, CK_NOFORK);
#endif

  srunner_run_all(runner, CK_NORMAL);
  num_failed = srunner_ntests_failed(runner);

#ifdef TRACE_MEMORY

  if (MemTrace_getNumLeaks() > 0)
  {
    MemTrace_printLeaks(stdout);
  }

  MemTrace_printStatistics(stdout);

#endif

  srunner_free(runner);

  return num_failed;
}
Example #2
0
int
main (void) 
{ 
  int num_failed;

  setTestDataDirectory();

  SRunner *runner = srunner_create( create_suite_UtilsUnit() );

  srunner_add_suite( runner, create_suite_UtilsUnitDefinition  () );
  srunner_add_suite( runner, create_suite_UnitFormulaFormatter () );
  srunner_add_suite( runner, create_suite_UnitFormulaFormatter1() );
  srunner_add_suite( runner, create_suite_FormulaUnitsData() );
  srunner_add_suite( runner, create_suite_DerivedUnitDefinition() );
  srunner_add_suite( runner, create_suite_UnitFormulaFormatter2() );
  srunner_add_suite( runner, create_suite_CalcUnitDefinition() );
  srunner_add_suite( runner, create_suite_UnitFormulaFormatter3() );
  


#ifdef TRACE_MEMORY
  srunner_set_fork_status(runner, CK_NOFORK);
#endif

  srunner_run_all(runner, CK_NORMAL);
  num_failed = srunner_ntests_failed(runner);

#ifdef TRACE_MEMORY

  if (MemTrace_getNumLeaks() > 0)
  {
    MemTrace_printLeaks(stdout);
  }

  MemTrace_printStatistics(stdout);

#endif

  srunner_free(runner);

  safe_free(TestDataDirectory);

  return num_failed;
}
Example #3
0
int
main (int argc, char* argv[]) 
{ 
  int num_failed;

  setTestDataDirectory();

  SRunner *runner = srunner_create( create_suite_ReadSBML               () );
  srunner_add_suite( runner, create_suite_SBMLValidatorAPI              () );
  srunner_add_suite( runner, create_suite_RenameIDs                     () );
  srunner_add_suite( runner, create_suite_RemoveFromParent              () );
  srunner_add_suite( runner, create_suite_GetMultipleObjects            () );
  srunner_add_suite( runner, create_suite_WriteSBML                     () );
  srunner_add_suite( runner, create_suite_WriteL3SBML                   () );
  srunner_add_suite( runner, create_suite_WriteL3V2SBML                 () );
  srunner_add_suite( runner, create_suite_AlgebraicRule                 () ); 
  srunner_add_suite( runner, create_suite_AssignmentRule                () );
  srunner_add_suite( runner, create_suite_Compartment                   () );
  srunner_add_suite( runner, create_suite_L3_Compartment                () );
  srunner_add_suite( runner, create_suite_Compartment_newSetters        () );
  srunner_add_suite( runner, create_suite_CompartmentType               () );
  srunner_add_suite( runner, create_suite_CompartmentType_newSetters    () );
  srunner_add_suite( runner, create_suite_CompartmentVolumeRule         () );
  srunner_add_suite( runner, create_suite_Constraint                    () );
  srunner_add_suite( runner, create_suite_Constraint_newSetters         () );
  srunner_add_suite( runner, create_suite_Delay                         () );
  srunner_add_suite( runner, create_suite_Event                         () );
  srunner_add_suite( runner, create_suite_L3_Event                      () );
  srunner_add_suite( runner, create_suite_Event_newSetters              () );
  srunner_add_suite( runner, create_suite_EventAssignment               () );
  srunner_add_suite( runner, create_suite_EventAssignment_newSetters    () );
  srunner_add_suite( runner, create_suite_FunctionDefinition            () );
  srunner_add_suite( runner, create_suite_FunctionDefinition_newSetters () );
  srunner_add_suite( runner, create_suite_InitialAssignment             () );
  srunner_add_suite( runner, create_suite_InitialAssignment_newSetters  () );
  srunner_add_suite( runner, create_suite_KineticLaw                    () );
  srunner_add_suite( runner, create_suite_KineticLaw_newSetters         () );
  srunner_add_suite( runner, create_suite_L3_KineticLaw                 () );
  srunner_add_suite( runner, create_suite_ListOf                        () );
  srunner_add_suite( runner, create_suite_Model                         () );
  srunner_add_suite( runner, create_suite_L3_Model                      () );
  srunner_add_suite( runner, create_suite_Model_newSetters              () );
  srunner_add_suite( runner, create_suite_ModifierSpeciesReference      () );
  srunner_add_suite( runner, create_suite_Parameter                     () );
  srunner_add_suite( runner, create_suite_L3_Parameter                  () );
  srunner_add_suite( runner, create_suite_L3_LocalParameter             () );
  srunner_add_suite( runner, create_suite_Parameter_newSetters          () );
  srunner_add_suite( runner, create_suite_ParameterRule                 () );
  srunner_add_suite( runner, create_suite_Priority                      () );
  srunner_add_suite( runner, create_suite_RateRule                      () );
  srunner_add_suite( runner, create_suite_Reaction                      () );
  srunner_add_suite( runner, create_suite_L3_Reaction                   () );
  srunner_add_suite( runner, create_suite_Reaction_newSetters           () );
  srunner_add_suite( runner, create_suite_Rule                          () );
  srunner_add_suite( runner, create_suite_Rule_newSetters               () );
  srunner_add_suite( runner, create_suite_SBase                         () );
  srunner_add_suite( runner, create_suite_SBase_newSetters              () );
  srunner_add_suite( runner, create_suite_Species                       () );
  srunner_add_suite( runner, create_suite_L3_Species                    () );
  srunner_add_suite( runner, create_suite_Species_newSetters            () );
  srunner_add_suite( runner, create_suite_SpeciesReference              () );
  srunner_add_suite( runner, create_suite_L3_SpeciesReference           () );
  srunner_add_suite( runner, create_suite_SpeciesReference_newSetters   () );
  srunner_add_suite( runner, create_suite_SpeciesConcentrationRule      () );
  srunner_add_suite( runner, create_suite_SpeciesType                   () );
  srunner_add_suite( runner, create_suite_SpeciesType_newSetters        () );
  srunner_add_suite( runner, create_suite_StoichiometryMath             () );
  srunner_add_suite( runner, create_suite_Trigger                       () );
  srunner_add_suite( runner, create_suite_L3Trigger                     () );
  srunner_add_suite( runner, create_suite_Unit                          () );
  srunner_add_suite( runner, create_suite_L3_Unit                       () );
  srunner_add_suite( runner, create_suite_Unit_newSetters               () );
  srunner_add_suite( runner, create_suite_UnitDefinition                () );
  srunner_add_suite( runner, create_suite_UnitDefinition_newSetters     () );
  srunner_add_suite( runner, create_suite_UnitKind                      () );
  srunner_add_suite( runner, create_suite_CopyAndClone                  () );
  srunner_add_suite( runner, create_suite_SBMLConvert                   () );
  srunner_add_suite( runner, create_suite_SBMLConvertStrict             () );
  srunner_add_suite( runner, create_suite_SBMLConvertFromL3V2           () );
  srunner_add_suite( runner, create_suite_SBMLDocument                  () );
  srunner_add_suite( runner, create_suite_SBMLError                     () );
  srunner_add_suite( runner, create_suite_TestReadFromFile1             () );
  srunner_add_suite( runner, create_suite_TestReadFromFile2             () );
  srunner_add_suite( runner, create_suite_TestReadFromFile3             () );
  srunner_add_suite( runner, create_suite_TestReadFromFile4             () );
  srunner_add_suite( runner, create_suite_TestReadFromFile5             () );
  srunner_add_suite( runner, create_suite_TestReadFromFile6             () );
  srunner_add_suite( runner, create_suite_TestReadFromFile7             () );
  srunner_add_suite( runner, create_suite_TestReadFromFile8             () );
  srunner_add_suite( runner, create_suite_TestReadFromFile9             () );
  srunner_add_suite( runner, create_suite_TestReadFromFileL2V5          () );
  srunner_add_suite( runner, create_suite_TestReadFromFileL3V2          () );
  srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_1        () );
  srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_2        () );
  srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_3        () );
  srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_4        () );
  srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_5        () );
  srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_6        () );
  srunner_add_suite( runner, create_suite_TestConsistencyChecks         () );
  srunner_add_suite( runner, create_suite_ParentObject                  () );
  srunner_add_suite( runner, create_suite_AncestorObject                () );
  srunner_add_suite( runner, create_suite_TestInternalConsistencyChecks () );
  srunner_add_suite( runner, create_suite_HasReqdAtt                    () );
  srunner_add_suite( runner, create_suite_HasReqdElements               () );
  srunner_add_suite( runner, create_suite_SBMLNamespaces                () );
  srunner_add_suite( runner, create_suite_SyntaxChecker                 () );
  srunner_add_suite( runner, create_suite_SBMLConstructorException      () );
  srunner_add_suite( runner, create_suite_SBMLTransforms                () );
  srunner_add_suite( runner, create_suite_GetMultipleObjects            () );
  srunner_add_suite( runner, create_suite_LevelCompatibility            () );
  srunner_add_suite( runner, create_suite_SBase_IdName                   () );
  srunner_add_suite( runner, create_suite_Attributes                   () );

#ifdef TRACE_MEMORY
  srunner_set_fork_status(runner, CK_NOFORK);
#else
  if (argc > 1 && !strcmp(argv[1], "-nofork"))
  {
    srunner_set_fork_status( runner, CK_NOFORK );
  }
#endif

  srunner_run_all(runner, CK_NORMAL);
  num_failed = srunner_ntests_failed(runner);

#ifdef TRACE_MEMORY

  if (MemTrace_getNumLeaks() > 0)
  {
    MemTrace_printLeaks(stdout);
  }

  MemTrace_printStatistics(stdout);

#endif

  srunner_free(runner);
  safe_free(TestDataDirectory);

  return num_failed;
}