diff options
Diffstat (limited to 'test/ir/symbexec.py')
| -rwxr-xr-x | test/ir/symbexec.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/ir/symbexec.py b/test/ir/symbexec.py index 48de6573..bd28c4ee 100755 --- a/test/ir/symbexec.py +++ b/test/ir/symbexec.py @@ -7,20 +7,20 @@ import unittest class TestSymbExec(unittest.TestCase): def test_ClassDef(self): - from miasm2.expression.expression import ExprInt32, ExprId, ExprMem, \ + from miasm2.expression.expression import ExprInt, ExprId, ExprMem, \ ExprCompose, ExprAff from miasm2.arch.x86.sem import ir_x86_32 from miasm2.ir.symbexec import SymbolicExecutionEngine from miasm2.ir.ir import AssignBlock - addrX = ExprInt32(-1) - addr0 = ExprInt32(0) - addr1 = ExprInt32(1) - addr8 = ExprInt32(8) - addr9 = ExprInt32(9) - addr20 = ExprInt32(20) - addr40 = ExprInt32(40) - addr50 = ExprInt32(50) + addrX = ExprInt(-1, 32) + addr0 = ExprInt(0, 32) + addr1 = ExprInt(1, 32) + addr8 = ExprInt(8, 32) + addr9 = ExprInt(9, 32) + addr20 = ExprInt(20, 32) + addr40 = ExprInt(40, 32) + addr50 = ExprInt(50, 32) mem0 = ExprMem(addr0) mem1 = ExprMem(addr1, 8) mem8 = ExprMem(addr8) @@ -44,18 +44,18 @@ class TestSymbExec(unittest.TestCase): self.assertEqual(e.eval_expr(ExprMem(addr1 - addr1)), id_x) self.assertEqual(e.eval_expr(ExprMem(addr1, 8)), id_y) self.assertEqual(e.eval_expr(ExprMem(addr1 + addr1)), ExprCompose( - id_x[16:32], ExprMem(ExprInt32(4), 16))) + id_x[16:32], ExprMem(ExprInt(4, 32), 16))) self.assertEqual(e.eval_expr(mem8), ExprCompose( - id_x[0:24], ExprMem(ExprInt32(11), 8))) + id_x[0:24], ExprMem(ExprInt(11, 32), 8))) self.assertEqual(e.eval_expr(mem40v), id_x[:8]) self.assertEqual(e.eval_expr(mem50w), ExprCompose( - id_y, ExprMem(ExprInt32(51), 8))) + id_y, ExprMem(ExprInt(51, 32), 8))) self.assertEqual(e.eval_expr(mem20), mem20) e.func_read = lambda x: x self.assertEqual(e.eval_expr(mem20), mem20) self.assertEqual(set(e.modified()), set(e.symbols)) self.assertRaises( - KeyError, e.symbols.__getitem__, ExprMem(ExprInt32(100))) + KeyError, e.symbols.__getitem__, ExprMem(ExprInt(100, 32))) self.assertEqual(e.apply_expr(id_eax), addr0) self.assertEqual(e.apply_expr(ExprAff(id_eax, addr9)), addr9) self.assertEqual(e.apply_expr(id_eax), addr9) |