Skip to content

Commit

Permalink
[NF] Add array binding test.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed May 22, 2018
1 parent affad0b commit bc4d228
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions flattening/modelica/scodeinst/BindingArray8.mo
@@ -0,0 +1,27 @@
// name: BindingArray8
// keywords:
// status: correct
// cflags: -d=newInst
//

model BindingArray8
parameter Real x[4] = {1, 2, 3, 4};
parameter Real y[2, 4] = {x, {5, 6, 7, 8}};
end BindingArray8;

// Result:
// class BindingArray8
// parameter Real x[1] = 1.0;
// parameter Real x[2] = 2.0;
// parameter Real x[3] = 3.0;
// parameter Real x[4] = 4.0;
// parameter Real y[1,1] = x[1];
// parameter Real y[1,2] = x[2];
// parameter Real y[1,3] = x[3];
// parameter Real y[1,4] = x[4];
// parameter Real y[2,1] = 5.0;
// parameter Real y[2,2] = 6.0;
// parameter Real y[2,3] = 7.0;
// parameter Real y[2,4] = 8.0;
// end BindingArray8;
// endResult
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -19,6 +19,7 @@ BindingArray4.mo \
BindingArray5.mo \
BindingArray6.mo \
BindingArray7.mo \
BindingArray8.mo \
bindings1.mo \
bindings4.mo \
bindings7.mo \
Expand Down

0 comments on commit bc4d228

Please sign in to comment.