Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NF] Add more record evaluation tests.
Belonging to [master]: - OpenModelica/OMCompiler#2447 - OpenModelica/OpenModelica-testsuite#950
- Loading branch information
1 parent
2a436dd
commit 0559144
Showing
3 changed files
with
54 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,25 @@ | ||
// name: CevalRecord5 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
record R | ||
Real x = 1.0; | ||
Real y = 2.0; | ||
Real z = 3.0; | ||
end R; | ||
|
||
model CevalRecord5 | ||
constant R r1 = R(4.0, 5.0, 6.0); | ||
Real x = r1.x; | ||
end CevalRecord5; | ||
|
||
// Result: | ||
// class CevalRecord5 | ||
// constant Real r1.x = 4.0; | ||
// constant Real r1.y = 5.0; | ||
// constant Real r1.z = 6.0; | ||
// Real x = 4.0; | ||
// end CevalRecord5; | ||
// 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// name: CevalRecord6 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
record R | ||
Real x = 1.0; | ||
Real y; | ||
Real z = 3.0; | ||
end R; | ||
|
||
model CevalRecord6 | ||
constant R r1; | ||
Real x = r1.x; | ||
Real z = r1.z; | ||
end CevalRecord6; | ||
|
||
// Result: | ||
// class CevalRecord6 | ||
// constant Real r1.x = 1.0; | ||
// constant Real r1.y; | ||
// constant Real r1.z = 3.0; | ||
// Real x = 1.0; | ||
// Real z = 3.0; | ||
// end CevalRecord6; | ||
// 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