diff options
| author | Florent Monjalet <florent.monjalet@gmail.com> | 2015-03-24 00:24:37 +0100 |
|---|---|---|
| committer | Florent Monjalet <florent.monjalet@gmail.com> | 2015-03-24 00:24:37 +0100 |
| commit | c8590c5985292d02e2989fac530ea2d3a30535f1 (patch) | |
| tree | e503e3fd04eac683a54dd4f94a462b469921fa69 /test/ir/translators/z3_ir.py | |
| parent | 001472b1cd3c89ebf60a86d29ae7d843d5e453db (diff) | |
| download | miasm-c8590c5985292d02e2989fac530ea2d3a30535f1.tar.gz miasm-c8590c5985292d02e2989fac530ea2d3a30535f1.zip | |
TranslatorZ3: Fixed from_ExprId when expr.name is an asmlabel
TODO: replace the asmlabel str by its offset?
Diffstat (limited to '')
| -rw-r--r-- | test/ir/translators/z3_ir.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ir/translators/z3_ir.py b/test/ir/translators/z3_ir.py index 5f8f3e45..fa656ed0 100644 --- a/test/ir/translators/z3_ir.py +++ b/test/ir/translators/z3_ir.py @@ -1,5 +1,6 @@ import z3 +from miasm2.core.asmbloc import asm_label from miasm2.expression.expression import * from miasm2.ir.translators.translator import Translator from miasm2.ir.translators.z3_ir import TranslatorZ3, Z3Mem @@ -137,5 +138,10 @@ for miasm_int, res in [(five, -5), (four, -4)]: z3_e6 = z3.BitVecVal(res, 32) assert equiv(ez3, z3_e6) +# -------------------------------------------------------------------------- +# Should just not throw anything +e7 = ExprId(asm_label("label_histoire", 0xdeadbeef), 32) +ez3 = Translator.to_language('z3').from_expr(e7) + print "TranslatorZ3 tests are OK." |