Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added test case for inner/outer enumeration dimensions when using b…
…indings.
- Loading branch information
Showing
2 changed files
with
31 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,30 @@ | ||
// name: EnumInnerOuterDim | ||
// keywords: enumeration enum inner outer dimension | ||
// status: correct | ||
// | ||
// Tests that inner outer arrays with enumeration dimensions are handled | ||
// correctly. | ||
// | ||
|
||
type E = enumeration (A, B, C); | ||
|
||
block Model1 | ||
outer parameter Real[E] p1; | ||
parameter Real[E] p2 = p1; | ||
end Model1; | ||
|
||
block Model2 | ||
inner parameter Real[E] p1; | ||
Model1 m1; | ||
end Model2; | ||
|
||
// Result: | ||
// class Model2 | ||
// parameter Real p1[E.A]; | ||
// parameter Real p1[E.B]; | ||
// parameter Real p1[E.C]; | ||
// parameter Real m1.p2[E.A] = p1[E.A]; | ||
// parameter Real m1.p2[E.B] = p1[E.B]; | ||
// parameter Real m1.p2[E.C] = p1[E.C]; | ||
// end Model2; | ||
// 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