Skip to content

Commit

Permalink
Added Integer expression simplification test.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Mar 29, 2018
1 parent b8fa29d commit 79b533b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions flattening/modelica/others/Makefile
Expand Up @@ -75,6 +75,7 @@ Simplify.mo \
Simplify2.mo \
SimplifyAbs.mo \
SimplifyBinary.mo \
SimplifyInteger1.mo \
SimplifyRangeInCall.mo \
SmallLinsys.mo \
Splice.mo \
Expand Down
29 changes: 29 additions & 0 deletions flattening/modelica/others/SimplifyInteger1.mo
@@ -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

0 comments on commit 79b533b

Please sign in to comment.