Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Integer expression simplification test.
Belonging to [master]: - OpenModelica/OMCompiler#2330 - OpenModelica/OpenModelica-testsuite#908
- Loading branch information
1 parent
b8fa29d
commit 79b533b
Showing
2 changed files
with
30 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,29 @@ | ||
// name: SimplifyInteger1 | ||
// keywords: simplify #4847 | ||
// status: correct | ||
// | ||
// | ||
|
||
model SimplifyInteger1 | ||
Integer x; | ||
Integer y1 = x + x; | ||
Integer y2 = x + x + x; | ||
Integer y3 = x + x + x + x; | ||
Integer y4 = x * x; | ||
Integer y5 = x * x * x; | ||
Integer y6 = x * x * x * x; | ||
Integer y7 = 2*x + 6*x; | ||
end SimplifyInteger1; | ||
|
||
// Result: | ||
// class SimplifyInteger1 | ||
// Integer x; | ||
// Integer y1 = 2 * x; | ||
// Integer y2 = 3 * x; | ||
// Integer y3 = 4 * x; | ||
// Integer y4 = x * x; | ||
// Integer y5 = x * x * x; | ||
// Integer y6 = x * x * x * x; | ||
// Integer y7 = 8 * x; | ||
// end SimplifyInteger1; | ||
// endResult |