diff options
| author | Ajax <commial@gmail.com> | 2017-01-13 17:42:44 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-01-13 17:42:44 +0100 |
| commit | 9ee84d6ed811f3c357c9e642dbc6d7ad20fae74f (patch) | |
| tree | b0d406cb4c367b55ca3278ad494a9be8c5c19f8a | |
| parent | a0b45744e254b438b258cfd3a17a7870a638d78c (diff) | |
| download | miasm-9ee84d6ed811f3c357c9e642dbc6d7ad20fae74f.tar.gz miasm-9ee84d6ed811f3c357c9e642dbc6d7ad20fae74f.zip | |
Expr: test that repr permit instanciation
| -rw-r--r-- | test/expression/expression.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/expression/expression.py b/test/expression/expression.py index 58c0ca37..8e8b5e07 100644 --- a/test/expression/expression.py +++ b/test/expression/expression.py @@ -51,3 +51,17 @@ for expr in [ print "For value %s" % consval.value for constraint in consval.constraints: print "\t%s" % constraint.to_constraint() + +# Repr +for expr in [ + cst1, + A, + ExprMem(cst1, 32), + ExprCond(cond1, cst1, cst2), + A + cst1, + ExprCompose(A, cst1), + A.msb(), + ExprAff(A, cst1), +]: + print repr(expr) + assert expr == eval(repr(expr)) |