about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--test/expression/expression.py14
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))