Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NF] Added function evaluation test with record.
Belonging to [master]: - OpenModelica/OMCompiler#2414 - OpenModelica/OpenModelica-testsuite#940
- Loading branch information
1 parent
2ec1643
commit 83fe9fa
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters