about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2017-03-30 16:10:13 +0200
committerAjax <commial@gmail.com>2017-03-30 16:25:41 +0200
commit8c211caed99021a3654c14db4cdc5c6ff0b612ee (patch)
tree3fca770e9ba8bd395a4f675dabd785d0ee0c3543
parent19af18b7bd57c37c6bdb3ef1a98b8111a9b74259 (diff)
downloadmiasm-8c211caed99021a3654c14db4cdc5c6ff0b612ee.tar.gz
miasm-8c211caed99021a3654c14db4cdc5c6ff0b612ee.zip
Update regression tests fo ModularIntervals mul
-rw-r--r--test/analysis/modularintervals.py7
-rw-r--r--test/analysis/range.py5
2 files changed, 12 insertions, 0 deletions
diff --git a/test/analysis/modularintervals.py b/test/analysis/modularintervals.py
index 36a29aa8..45aa82bd 100644
--- a/test/analysis/modularintervals.py
+++ b/test/analysis/modularintervals.py
@@ -89,6 +89,13 @@ def test(left, right):
                     rez = (x ^ y) & mask
                     assert rez in result
 
+            # Check MUL
+            result = left_i * right_i
+            for x in left_values:
+                for y in right_values:
+                    rez = (x * y) & mask
+                    assert rez in result
+
             # Check >>
             result = left_i >> right_i
             for x in left_values:
diff --git a/test/analysis/range.py b/test/analysis/range.py
index 8b1224f9..0e38ec95 100644
--- a/test/analysis/range.py
+++ b/test/analysis/range.py
@@ -55,6 +55,11 @@ for expr in [
         ExprInt(33, 8) % ExprInt(8, 8),
         a % a,
         a[:2].zeroExtend(8) + ExprInt(0xF, 8) % ExprCond(a[0:1], ExprInt(5, 8), ExprInt(18, 8)),
+        ExprInt(33, 8) * ExprInt(8, 8),
+        a * a,
+        a * ExprInt(0, 8),
+        ExprInt(4, 8) * a,
+        (a[:2].zeroExtend(8) + ExprInt(0xF, 8)) * ExprCond(a[0:1], ExprInt(5, 8), ExprInt(18, 8)),
         ExprOp("<<<", ExprInt(4, 8), ExprInt(1, 8)),
         ExprOp("<<<", ExprInt(4, 8), ExprInt(14, 8)),
         ExprOp("<<<", ExprInt(4, 8), a),