Skip to content

Commit

Permalink
[NF] Add dimension deduction 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 f0dc635 commit 4a35da1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions flattening/modelica/scodeinst/DimUnknown8.mo
@@ -0,0 +1,35 @@
// name: DimUnknown8
// keywords:
// status: correct
// cflags: -d=newInst
//
//

model A
Real x[:];
Real y[size(x, 1)];
end A;

model DimUnknown8
A a[2](each x = {1, 2, 3});
end DimUnknown8;

// Result:
// class DimUnknown8
// Real a[1].x[1];
// Real a[1].x[2];
// Real a[1].x[3];
// Real a[1].y[1];
// Real a[1].y[2];
// Real a[1].y[3];
// Real a[2].x[1];
// Real a[2].x[2];
// Real a[2].x[3];
// Real a[2].y[1];
// Real a[2].y[2];
// Real a[2].y[3];
// equation
// a[1].x = {1.0, 2.0, 3.0};
// a[2].x = {1.0, 2.0, 3.0};
// end DimUnknown8;
// endResult
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -232,6 +232,7 @@ DimUnknown4.mo \
DimUnknown5.mo \
DimUnknown6.mo \
DimUnknown7.mo \
DimUnknown8.mo \
dim1.mo \
dim13.mo \
dim16.mo \
Expand Down

0 comments on commit 4a35da1

Please sign in to comment.