diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-10-21 16:19:09 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-11-04 16:45:46 +0100 |
| commit | 3771288cffdd53c1ff87857374bd13c550b355dc (patch) | |
| tree | b85469ca5e38aeb54e19d24ccb4bea1ecf627b5e /test/ir/symbexec.py | |
| parent | 589d4fd9ebd61216155bba9f1988bbd5c3094a2b (diff) | |
| download | miasm-3771288cffdd53c1ff87857374bd13c550b355dc.tar.gz miasm-3771288cffdd53c1ff87857374bd13c550b355dc.zip | |
ExprCompose: add new api
The ExprComposes uses directly its arguments sizes to guess the slices locations. Old api: ExprCompose([(a, 0, 32), (b, 32, 64)]) becomes: ExprCompose(a, b)
Diffstat (limited to 'test/ir/symbexec.py')
| -rw-r--r-- | test/ir/symbexec.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ir/symbexec.py b/test/ir/symbexec.py index 19cc47db..6df0bbc3 100644 --- a/test/ir/symbexec.py +++ b/test/ir/symbexec.py @@ -43,12 +43,12 @@ 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], 0, 16), (ExprMem(ExprInt32(4), 16), 16, 32)])) + id_x[16:32], ExprMem(ExprInt32(4), 16))) self.assertEqual(e.eval_expr(mem8), ExprCompose( - [(id_x[0:24], 0, 24), (ExprMem(ExprInt32(11), 8), 24, 32)])) + id_x[0:24], ExprMem(ExprInt32(11), 8))) self.assertEqual(e.eval_expr(mem40v), id_x[:8]) self.assertEqual(e.eval_expr(mem50w), ExprCompose( - [(id_y, 0, 8), (ExprMem(ExprInt32(51), 8), 8, 16)])) + id_y, ExprMem(ExprInt32(51), 8))) self.assertEqual(e.eval_expr(mem20), mem20) e.func_read = lambda x: x self.assertEqual(e.eval_expr(mem20), mem20) |