Skip to content

Commit

Permalink
[NF] Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Jun 8, 2018
1 parent f42c0a9 commit 82c85da
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
38 changes: 38 additions & 0 deletions flattening/modelica/scodeinst/ForEquation7.mo
@@ -0,0 +1,38 @@
// name: ForEquation7
// keywords:
// status: correct
// cflags: -d=newInst
//
//

model ForEquation7
Real x;
equation
for i in 1:5 loop
for j in i+1:i+3 loop
x = j * i;
end for;
end for;
end ForEquation7;

// Result:
// class ForEquation7
// Real x;
// equation
// x = 2.0;
// x = 3.0;
// x = 4.0;
// x = 6.0;
// x = 8.0;
// x = 10.0;
// x = 12.0;
// x = 15.0;
// x = 18.0;
// x = 20.0;
// x = 24.0;
// x = 28.0;
// x = 30.0;
// x = 35.0;
// x = 40.0;
// end ForEquation7;
// endResult
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/FuncBuiltinProduct.mo
Expand Up @@ -18,6 +18,6 @@ end FuncBuiltinProduct;
// Real r1 = 6.0;
// Real r2 = 6.0;
// Real r3 = 362880.0;
// Real r4 = /*Real*/(product(1:0));
// Real r4 = 1.0;
// end FuncBuiltinProduct;
// endResult
2 changes: 1 addition & 1 deletion flattening/modelica/scodeinst/FuncBuiltinSum.mo
Expand Up @@ -18,6 +18,6 @@ end FuncBuiltinSum;
// Real r1 = 6.0;
// Real r2 = 6.0;
// Real r3 = 45.0;
// Real r4 = /*Real*/(sum(1:0));
// Real r4 = 0.0;
// end FuncBuiltinSum;
// endResult
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -347,6 +347,7 @@ ForEquation3.mo \
ForEquation4.mo \
ForEquation5.mo \
ForEquation6.mo \
ForEquation7.mo \
ForEquationEnum1.mo \
ForEquationEnum2.mo \
ForEquationNonParam.mo \
Expand Down

0 comments on commit 82c85da

Please sign in to comment.