Skip to content

Commit

Permalink
[NF] Update tests.
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - #134
  - OpenModelica/OMCompiler#3047
  • Loading branch information
perost authored and OpenModelica-Hudson committed Apr 8, 2019
1 parent 6527a58 commit 65ae273
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions testsuite/flattening/modelica/scodeinst/Makefile
Expand Up @@ -750,6 +750,7 @@ Size2.mo \
Size3.mo \
Size4.mo \
Size5.mo \
Size6.mo \
SizeInvalidArgs1.mo \
SizeInvalidArgs2.mo \
SizeInvalidIndex1.mo \
Expand Down
33 changes: 33 additions & 0 deletions testsuite/flattening/modelica/scodeinst/Size6.mo
@@ -0,0 +1,33 @@
// name: Size6
// keywords: size
// status: correct
// cflags: -d=newInst
//
// Tests the builtin size operator.
//

type T = Real[4];

model A
T x;
end A;

model Size6
Real x[n];
A a;
parameter Integer n = size(a.x, 1);
end Size6;

// Result:
// class Size6
// Real x[1];
// Real x[2];
// Real x[3];
// Real x[4];
// Real a.x[1];
// Real a.x[2];
// Real a.x[3];
// Real a.x[4];
// parameter Integer n = 4;
// end Size6;
// endResult

0 comments on commit 65ae273

Please sign in to comment.