Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
refs ticket:4850

Belonging to [master]:
  - OpenModelica/OMCompiler#2332
  - OpenModelica/OpenModelica-testsuite#910
  • Loading branch information
vruge authored and OpenModelica-Hudson committed Mar 29, 2018
1 parent e1daf28 commit b374bc7
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions simulation/modelica/commonSubExp/testBug4850.mos
@@ -0,0 +1,34 @@
// name: cseSum
// keywords: cse
// status: correct

loadString("
function foo
input Real[:] x;
output Real[:] y = x;
end foo;

model foobar
Real y = sum(foo({time, time*2}));
end foobar;
");
getErrorString();

simulate(foobar);
getErrorString();

val(y, {0,1});

// Result:
// true
// ""
// record SimulationResult
// resultFile = "foobar_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'foobar', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
// ""
// {0.0,3.0}
// endResult

0 comments on commit b374bc7

Please sign in to comment.