Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
[NF] Update tests.
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2542
  - #986
  • Loading branch information
perost authored and OpenModelica-Hudson committed Jun 29, 2018
1 parent 863cf13 commit ba2ec98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flattening/modelica/scodeinst/FuncBuiltinProduct.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ model FuncBuiltinProduct
Real r2 = product({{1}, {2}, {3}});
Real r3 = product({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
Real r4 = product(1:0);
Real x[3];
Real r5 = product(x);
end FuncBuiltinProduct;

// Result:
Expand All @@ -19,5 +21,9 @@ end FuncBuiltinProduct;
// Real r2 = 6.0;
// Real r3 = 362880.0;
// Real r4 = 1.0;
// Real x[1];
// Real x[2];
// Real x[3];
// Real r5 = x[1] * x[2] * x[3];
// end FuncBuiltinProduct;
// endResult
6 changes: 6 additions & 0 deletions flattening/modelica/scodeinst/FuncBuiltinSum.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ model FuncBuiltinSum
Real r2 = sum({{1}, {2}, {3}});
Real r3 = sum({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
Real r4 = sum(1:0);
Real x[3];
Real r5 = sum(x);
end FuncBuiltinSum;

// Result:
Expand All @@ -19,5 +21,9 @@ end FuncBuiltinSum;
// Real r2 = 6.0;
// Real r3 = 45.0;
// Real r4 = 0.0;
// Real x[1];
// Real x[2];
// Real x[3];
// Real r5 = x[1] + x[2] + x[3];
// end FuncBuiltinSum;
// endResult

0 comments on commit ba2ec98

Please sign in to comment.