Skip to content

Commit

Permalink
[NF] Add testcase for size of constant dimension.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Mar 20, 2018
1 parent bf7ba0b commit c580b85
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -548,6 +548,7 @@ ReinitInvalid6.mo \
Size1.mo \
Size2.mo \
Size3.mo \
Size4.mo \
SizeInvalidArgs1.mo \
SizeInvalidArgs2.mo \
SizeInvalidIndex1.mo \
Expand Down
22 changes: 22 additions & 0 deletions flattening/modelica/scodeinst/Size4.mo
@@ -0,0 +1,22 @@
// name: Size4
// keywords: size
// status: correct
// cflags: -d=newInst
//
// Tests the builtin size operator.
//

model Size4
Real x[3];
constant Integer n = size(x, 1);
end Size4;


// Result:
// class Size4
// Real x[1];
// Real x[2];
// Real x[3];
// constant Integer n = 3;
// end Size4;
// endResult

0 comments on commit c580b85

Please sign in to comment.