Skip to content

Commit

Permalink
Give expected output for bug2756
Browse files Browse the repository at this point in the history
Note: The actual bug is not fixed. Only one of the simple models
derived for it.
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Oct 4, 2017
1 parent 333f946 commit 2dfe8db
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions openmodelica/cruntime/codegen/bug2756.mos
@@ -1,9 +1,8 @@
// name: bug2756.mos
// keywords: delay
// status: correct
//
//
// test for #2756
//
//

loadString("
model bug2756
Expand All @@ -22,10 +21,22 @@ algorithm
for i in 1:2 loop
s := s + x[i].R;
end for;
assert(abs(s-2) < 1e-30, \"Assertion failed\");
end bug2756;
"); getErrorString();

simulate(bug2756); getErrorString();
simulate(bug2756,simflags="-output s"); getErrorString();

// Result:
// true
// ""
// record SimulationResult
// resultFile = "bug2756_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'bug2756', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-output s'",
// messages = "stdout | info | The initialization finished successfully without homotopy method.
// time=1,s=2
// stdout | info | The simulation finished successfully.
// "
// end SimulationResult;
// ""
// endResult

0 comments on commit 2dfe8db

Please sign in to comment.