Skip to content

Commit

Permalink
[NF] Add function evaluation test.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Jun 4, 2018
1 parent 61b0427 commit 391deb8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions flattening/modelica/scodeinst/CevalFuncRecord5.mo
@@ -0,0 +1,32 @@
// name: CevalFuncRecord4
// keywords:
// status: correct
// cflags: -d=newInst
//
//

record R
Real x;
Real y;
end R;

function f
input R inR;
output R outR;
algorithm
outR.x := 1.0;
end f;

model CevalFuncRecord5
parameter R r1;
parameter R r2 = f(r1);
end CevalFuncRecord5;

// Result:
// class CevalFuncRecord5
// parameter Real r1.x;
// parameter Real r1.y;
// parameter Real r2.x = 1.0;
// parameter Real r2.y;
// end CevalFuncRecord5;
// endResult
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -81,6 +81,7 @@ CevalFuncRecord1.mo \
CevalFuncRecord2.mo \
CevalFuncRecord3.mo \
CevalFuncRecord4.mo \
CevalFuncRecord5.mo \
CevalFuncRecursive1.mo \
CevalFuncRecursive2.mo \
CevalFuncTerminate1.mo \
Expand Down

0 comments on commit 391deb8

Please sign in to comment.