diff options
| author | Ajax <commial@gmail.com> | 2017-01-13 17:26:52 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-01-13 17:26:52 +0100 |
| commit | 50f6ca146c0b810982ad5b42eea84ee0b6d26f8a (patch) | |
| tree | e2ec03480cf9e17f5413c12ed9a86948cc015492 /test/expression | |
| parent | 49d009a0fabd96e930a7f0233b3b5525bdec2957 (diff) | |
| download | miasm-50f6ca146c0b810982ad5b42eea84ee0b6d26f8a.tar.gz miasm-50f6ca146c0b810982ad5b42eea84ee0b6d26f8a.zip | |
Modint: add tests for big int
Diffstat (limited to 'test/expression')
| -rw-r--r-- | test/expression/modint.py | 9 |
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) + |