about summary refs log tree commit diff stats
path: root/test/expression/simplifications.py
diff options
context:
space:
mode:
authorajax <devnull@localhost>2014-07-30 15:47:55 +0200
committerajax <devnull@localhost>2014-07-30 15:47:55 +0200
commitc33451c9e1874a54498c3ad9fda560631c94bb8a (patch)
tree0e55f8aff39851afbf2f14a9f3b0450f056aa89d /test/expression/simplifications.py
parente97492dbd0b93c58305c7d5c5b4ecc538e7f7274 (diff)
downloadfocaccia-miasm-c33451c9e1874a54498c3ad9fda560631c94bb8a.tar.gz
focaccia-miasm-c33451c9e1874a54498c3ad9fda560631c94bb8a.zip
Simplification: Fix 'A op 0' with op == '-' bug, add corresponding test case
Diffstat (limited to 'test/expression/simplifications.py')
-rw-r--r--test/expression/simplifications.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py
index 6b437218..0f217c72 100644
--- a/test/expression/simplifications.py
+++ b/test/expression/simplifications.py
@@ -155,6 +155,8 @@ to_test = [(ExprInt32(1) - ExprInt32(1), ExprInt32(0)),
     (a & b & ExprInt_fromsize(a.size, -1), a & b),
     (a | b | ExprInt_fromsize(a.size, -1),
      ExprInt_fromsize(a.size, -1)),
+    (ExprOp('-', ExprInt8(1), ExprInt8(0)),
+     ExprInt8(1)),
 ]
 
 for e, e_check in to_test[:]: