Skip to content

Commit 2e09755

Browse files
author
Jens Frenkel
committed
- report warning if reference time array is to small
- move Modelica.Electrical.MultiPhase.Examples.TransformerYD.mos to working tests git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12599 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent d307360 commit 2e09755

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Compiler/runtime/SimulationResultsCmp.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,11 @@ void* SimulationResultsCmp_compareResults(const char *filename, const char *reff
632632
return mk_cons(mk_scon("Error get ref time!"),mk_nil());
633633
}
634634
}
635-
635+
/* check if reftime is larger or equal time */
636+
res = mk_nil();
637+
if (time.data[time.n] > timeref.data[timeref.n]) {
638+
res = mk_cons(mk_scon("Reference file has not enough time points!\n"),res);
639+
}
636640
var1=NULL;
637641
var2=NULL;
638642
/* compare vars */
@@ -698,7 +702,6 @@ void* SimulationResultsCmp_compareResults(const char *filename, const char *reff
698702
/* fprintf(stderr, "diff: %d\n",ddf.n); */
699703
/* for (i=0;i<vardiffindx;i++)
700704
fprintf(stderr, "diffVar: %s\n",cmpdiffvars[i]); */
701-
res = mk_nil();
702705
for (i=0;i<vardiffindx;i++){
703706
res = (void*)mk_cons(mk_scon(cmpdiffvars[i]),res);
704707
}

0 commit comments

Comments
 (0)