Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NF] Add testcase for size of constant dimension.
Belonging to [master]: - OpenModelica/OMCompiler#2294 - OpenModelica/OpenModelica-testsuite#886
- Loading branch information
1 parent
bf7ba0b
commit c580b85
Showing
2 changed files
with
23 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
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,22 @@ | ||
// name: Size4 | ||
// keywords: size | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// Tests the builtin size operator. | ||
// | ||
|
||
model Size4 | ||
Real x[3]; | ||
constant Integer n = size(x, 1); | ||
end Size4; | ||
|
||
|
||
// Result: | ||
// class Size4 | ||
// Real x[1]; | ||
// Real x[2]; | ||
// Real x[3]; | ||
// constant Integer n = 3; | ||
// end Size4; | ||
// endResult |