Skip to content

Commit

Permalink
[NF] Added function evaluation test with record.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed May 7, 2018
1 parent 2ec1643 commit 83fe9fa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions flattening/modelica/scodeinst/CevalFuncRecord1.mo
@@ -0,0 +1,28 @@
// name: CevalFuncRecord1
// keywords:
// status: correct
// cflags: -d=newInst
//
//

record R
Real x;
Real y;
end R;

function f
input Real x;
input Real y;
output R r(x = x, y = y);
end f;

model CevalFuncRecord1
parameter R r = f(1.0, 2.0);
end CevalFuncRecord1;

// Result:
// class CevalFuncRecord1
// parameter Real r.x = 1.0;
// parameter Real r.y = 2.0;
// end CevalFuncRecord1;
// endResult
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Expand Up @@ -73,6 +73,7 @@ CevalFuncAssert2.mo \
CevalFuncFor1.mo \
CevalFuncFor2.mo \
CevalFuncIf1.mo \
CevalFuncRecord1.mo \
CevalFuncRecursive1.mo \
CevalFuncRecursive2.mo \
CevalFuncTerminate1.mo \
Expand Down

0 comments on commit 83fe9fa

Please sign in to comment.