about summary refs log tree commit diff stats
path: root/test/ir/symbexec.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2016-02-16 16:36:43 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2016-02-16 16:36:43 +0100
commit91e9abd906c0a9f5b43bad5b9789ffa1b054f6fe (patch)
tree30f32695bc995a4cd56f902313aad3a1d4a411f4 /test/ir/symbexec.py
parent2cf69707481ba4b0dd163b49d99bc9a021162944 (diff)
parent052c02757c8c7aecabb9d86c30dfd672e46ccfa4 (diff)
downloadmiasm-91e9abd906c0a9f5b43bad5b9789ffa1b054f6fe.tar.gz
miasm-91e9abd906c0a9f5b43bad5b9789ffa1b054f6fe.zip
Merge pull request #325 from commial/jitter-symbexec
Eval_Expr in jitter context
Diffstat (limited to 'test/ir/symbexec.py')
-rw-r--r--test/ir/symbexec.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ir/symbexec.py b/test/ir/symbexec.py
index 1d87b470..9165fccb 100644
--- a/test/ir/symbexec.py
+++ b/test/ir/symbexec.py
@@ -7,7 +7,8 @@ import unittest
 class TestSymbExec(unittest.TestCase):
 
     def test_ClassDef(self):
-        from miasm2.expression.expression import ExprInt32, ExprId, ExprMem, ExprCompose
+        from miasm2.expression.expression import ExprInt32, ExprId, ExprMem, \
+            ExprCompose, ExprAff
         from miasm2.arch.x86.sem import ir_x86_32
         from miasm2.ir.symbexec import symbexec
 
@@ -52,6 +53,9 @@ class TestSymbExec(unittest.TestCase):
         self.assertEqual(set(e.modified()), set(e.symbols))
         self.assertRaises(
             KeyError, e.symbols.__getitem__, ExprMem(ExprInt32(100)))
+        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)
 
 if __name__ == '__main__':
     testsuite = unittest.TestLoader().loadTestsFromTestCase(TestSymbExec)