about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2017-01-13 17:26:52 +0100
committerAjax <commial@gmail.com>2017-01-13 17:26:52 +0100
commit50f6ca146c0b810982ad5b42eea84ee0b6d26f8a (patch)
treee2ec03480cf9e17f5413c12ed9a86948cc015492
parent49d009a0fabd96e930a7f0233b3b5525bdec2957 (diff)
downloadmiasm-50f6ca146c0b810982ad5b42eea84ee0b6d26f8a.tar.gz
miasm-50f6ca146c0b810982ad5b42eea84ee0b6d26f8a.zip
Modint: add tests for big int
-rw-r--r--test/expression/modint.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/expression/modint.py b/test/expression/modint.py
index f353bc21..17c12907 100644
--- a/test/expression/modint.py
+++ b/test/expression/modint.py
@@ -61,3 +61,12 @@ assert(c % -3 == 1)
 print e + c, c + e, c - e, e - c
 print 1000 * a
 print hex(a)
+
+define_int(128)
+define_uint(128)
+h = uint128(0x11223344556677889900AABBCCDDEEFF)
+i = int128(-0x9900AABBCCDDEEFF1122334455667788)
+
+assert(i / h == 6)
+assert(i % h == 0x3221aa32bb43cd58d9cc54dd65ee7e)
+