/[ascend]/trunk/ascend/integrator/test/test_ida.c
ViewVC logotype

Diff of /trunk/ascend/integrator/test/test_ida.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2551 by jpye, Thu Feb 2 20:14:50 2012 UTC revision 2552 by jpye, Thu Feb 2 20:54:40 2012 UTC
# Line 74  IntegratorReporter test_ida_reporter = { Line 74  IntegratorReporter test_ida_reporter = {
74  */  */
75  static void test_boundary(){  static void test_boundary(){
76      Asc_CompilerInit(1);      Asc_CompilerInit(1);
     /* set current directory to same dir as test executable */  
     struct FilePath *testfp, *oldwd = ospath_getcwd();  
     CU_ASSERT_FATAL(NULL != oldwd);  
     testfp = ospath_new(ASC_TEST_PATH);  
     ospath_chdir(testfp);  
     ospath_free(testfp);  
77    
78      /* set paths relative to test executable */      /* set paths relative to test executable */
79      Asc_PutEnv(ASC_ENV_LIBRARY "=../models");      Asc_PutEnv(ASC_ENV_LIBRARY "=models");
80      Asc_PutEnv(ASC_ENV_SOLVERS "=../solvers/ida");      Asc_PutEnv(ASC_ENV_SOLVERS "=solvers/ida");
81        package_load("ida",NULL);
82    
83      /* load the file */      /* load the file */
84      char path[PATH_MAX];      char path[PATH_MAX];
# Line 120  static void test_boundary(){ Line 115  static void test_boundary(){
115      CU_ASSERT_FATAL(sys != NULL);      CU_ASSERT_FATAL(sys != NULL);
116    
117      IntegratorSystem *integ = integrator_new(sys,siminst);      IntegratorSystem *integ = integrator_new(sys,siminst);
118        
119      CU_ASSERT_FATAL(0 == integrator_set_engine(integ,"IDA"));      CU_ASSERT_FATAL(0 == integrator_set_engine(integ,"IDA"));
120      CONSOLE_DEBUG("Assigned integrator '%s'...",integ->internals->name);      CONSOLE_DEBUG("Assigned integrator '%s'...",integ->internals->name);
121    
# Line 158  static void test_boundary(){ Line 153  static void test_boundary(){
153    
154      integrator_free(integ);      integrator_free(integ);
155      samplelist_free(samplelist);      samplelist_free(samplelist);
156        
157      CU_ASSERT_FATAL(NULL != sys);      CU_ASSERT_FATAL(NULL != sys);
158      system_destroy(sys);      system_destroy(sys);
159      system_free_reused_mem();      system_free_reused_mem();

Legend:
Removed from v.2551  
changed lines
  Added in v.2552

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22