diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/expression/simplifications.py | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py index e4c3f2e9..53283bef 100644 --- a/test/expression/simplifications.py +++ b/test/expression/simplifications.py @@ -3,7 +3,6 @@ # from pdb import pm from miasm2.expression.expression import * -from miasm2.expression.expression_helper import expr_cmpu, expr_cmps from miasm2.expression.simplifications import expr_simp, ExpressionSimplifier from miasm2.expression.simplifications_cond import ExprOp_inf_signed, ExprOp_inf_unsigned, ExprOp_equal @@ -268,37 +267,37 @@ to_test = [(ExprInt(1, 32) - ExprInt(1, 32), ExprInt(0, 32)), a[:16]), ((a << ExprInt(16, 32))[24:32], a[8:16]), - (expr_cmpu(ExprInt(0, 32), ExprInt(0, 32)), + (expr_is_unsigned_greater(ExprInt(0, 32), ExprInt(0, 32)), ExprInt(0, 1)), - (expr_cmpu(ExprInt(10, 32), ExprInt(0, 32)), + (expr_is_unsigned_greater(ExprInt(10, 32), ExprInt(0, 32)), ExprInt(1, 1)), - (expr_cmpu(ExprInt(10, 32), ExprInt(5, 32)), + (expr_is_unsigned_greater(ExprInt(10, 32), ExprInt(5, 32)), ExprInt(1, 1)), - (expr_cmpu(ExprInt(5, 32), ExprInt(10, 32)), + (expr_is_unsigned_greater(ExprInt(5, 32), ExprInt(10, 32)), ExprInt(0, 1)), - (expr_cmpu(ExprInt(-1, 32), ExprInt(0, 32)), + (expr_is_unsigned_greater(ExprInt(-1, 32), ExprInt(0, 32)), ExprInt(1, 1)), - (expr_cmpu(ExprInt(-1, 32), ExprInt(-1, 32)), + (expr_is_unsigned_greater(ExprInt(-1, 32), ExprInt(-1, 32)), ExprInt(0, 1)), - (expr_cmpu(ExprInt(0, 32), ExprInt(-1, 32)), + (expr_is_unsigned_greater(ExprInt(0, 32), ExprInt(-1, 32)), ExprInt(0, 1)), - (expr_cmps(ExprInt(0, 32), ExprInt(0, 32)), + (expr_is_signed_greater(ExprInt(0, 32), ExprInt(0, 32)), ExprInt(0, 1)), - (expr_cmps(ExprInt(10, 32), ExprInt(0, 32)), + (expr_is_signed_greater(ExprInt(10, 32), ExprInt(0, 32)), ExprInt(1, 1)), - (expr_cmps(ExprInt(10, 32), ExprInt(5, 32)), + (expr_is_signed_greater(ExprInt(10, 32), ExprInt(5, 32)), ExprInt(1, 1)), - (expr_cmps(ExprInt(5, 32), ExprInt(10, 32)), + (expr_is_signed_greater(ExprInt(5, 32), ExprInt(10, 32)), ExprInt(0, 1)), - (expr_cmps(ExprInt(-1, 32), ExprInt(0, 32)), + (expr_is_signed_greater(ExprInt(-1, 32), ExprInt(0, 32)), ExprInt(0, 1)), - (expr_cmps(ExprInt(-1, 32), ExprInt(-1, 32)), + (expr_is_signed_greater(ExprInt(-1, 32), ExprInt(-1, 32)), ExprInt(0, 1)), - (expr_cmps(ExprInt(0, 32), ExprInt(-1, 32)), + (expr_is_signed_greater(ExprInt(0, 32), ExprInt(-1, 32)), ExprInt(1, 1)), - (expr_cmps(ExprInt(-5, 32), ExprInt(-10, 32)), + (expr_is_signed_greater(ExprInt(-5, 32), ExprInt(-10, 32)), ExprInt(1, 1)), - (expr_cmps(ExprInt(-10, 32), ExprInt(-5, 32)), + (expr_is_signed_greater(ExprInt(-10, 32), ExprInt(-5, 32)), ExprInt(0, 1)), (ExprOp("idiv", ExprInt(0x0123, 16), ExprInt(0xfffb, 16))[:8], |