about summary refs log tree commit diff stats
path: root/test/expression/modint.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2017-01-13 17:26:04 +0100
committerAjax <commial@gmail.com>2017-01-13 17:26:47 +0100
commit49d009a0fabd96e930a7f0233b3b5525bdec2957 (patch)
tree6c83406a5204823027bfe76542487cd6e471d12b /test/expression/modint.py
parent632f95b8ce745ef77ecb9f46054c1964ddc59e3e (diff)
downloadmiasm-49d009a0fabd96e930a7f0233b3b5525bdec2957.tar.gz
miasm-49d009a0fabd96e930a7f0233b3b5525bdec2957.zip
Div: fix modint operation
Diffstat (limited to '')
-rw-r--r--test/expression/modint.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/expression/modint.py b/test/expression/modint.py
index e7c19d0c..f353bc21 100644
--- a/test/expression/modint.py
+++ b/test/expression/modint.py
@@ -8,7 +8,7 @@ d = uint1(0)
 e = uint1(1)
 
 f = uint8(0x1)
-
+g = int8(-3)
 
 print a, b, c
 print a + b, a + c, b + c
@@ -53,6 +53,10 @@ assert(f ^ f == 0)
 assert(f ^ 0 == f)
 assert(0 ^ f == f)
 assert(1 ^ f == 0)
+assert(c / g == -1)
+assert(c / -3 == -1)
+assert(c % g == 1)
+assert(c % -3 == 1)
 
 print e + c, c + e, c - e, e - c
 print 1000 * a