Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove try catch and update discrete output var detection - add testcase for ticket #5659
- Loading branch information
Showing
3 changed files
with
56 additions
and
18 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
37 changes: 37 additions & 0 deletions
37
testsuite/simulation/modelica/algorithms_functions/bug_5659.mos
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,37 @@ | ||
// name: bug_5659 | ||
// keywords: | ||
// status: correct | ||
// teardown_command: rm -rf bug_5659_* _bug_5659_* output.log | ||
// | ||
// tests for counting of algorithm section output variables involving | ||
// arrays and records combined. | ||
// | ||
|
||
loadString(" | ||
/*slightly altered ticket model. | ||
https://trac.openmodelica.org/OpenModelica/ticket/5659 | ||
*/ | ||
model bug_5659 | ||
discrete Real x; | ||
discrete Real[2] data; | ||
Real y; | ||
algorithm | ||
x := 1; | ||
when sample(0, 0.1) then | ||
data[1] := time; | ||
end when; | ||
y := cos(time); | ||
end bug_5659; | ||
"); getErrorString(); | ||
|
||
// bug_5659 has 4 equation(s) and 4 variable(s) | ||
checkModel(bug_5659); getErrorString(); | ||
|
||
// Result: | ||
// true | ||
// "" | ||
// "Check of bug_5659 completed successfully. | ||
// Class bug_5659 has 4 equation(s) and 4 variable(s). | ||
// 0 of these are trivial equation(s)." | ||
// "" | ||
// endResult |