Beispiel #1
0
 def mod_signed_bitmap_unsigned():
     '''-23983 % -5 == 2'''
     mask = 2**64 - 1
     x = (-23983 & mask, 64)
     res = bitmap.mod(x, -5)
     if bitmap.value(res) == 0xfffffffffffffffe:
         raise Success
Beispiel #2
0
 def mod_signed_bitmap_signed():
     '''-23983 % -5 == -3'''
     mask = 2**64 - 1
     x = (-23983 & mask, -64)
     res = bitmap.mod(x, -5)
     if bitmap.signed(res) and bitmap.value(res) == -3:
         raise Success
Beispiel #3
0
 def mod_unsigned_bitmap_unsigned():
     '''23983 % 5 == 3'''
     mask = 2**64 - 1
     x = (23983 & mask, 64)
     res = bitmap.mod(x, 5)
     if bitmap.value(res) == 3:
         raise Success
Beispiel #4
0
 def mod_unsigned_bitmap_signed():
     '''23983 % -5 == -2'''
     mask = pow(2, 64) - 1
     x = (23983 & mask, -64)
     res = bitmap.mod(x, -5)
     if bitmap.signed(res) and bitmap.value(res) == -2:
         raise Success
Beispiel #5
0
 def mod_signed_bitmap_signed():
     '''-23983 % -5 == -3'''
     mask=2**64-1
     x = (-23983&mask,-64)
     res = bitmap.mod(x, -5)
     if bitmap.signed(res) and bitmap.value(res) == -3:
         raise Success
Beispiel #6
0
 def mod_signed_bitmap_unsigned():
     '''-23983 % -5 == 2'''
     mask=2**64-1
     x = (-23983&mask,64)
     res = bitmap.mod(x, -5)
     if bitmap.value(res) == 0xfffffffffffffffe:
         raise Success
Beispiel #7
0
 def mod_unsigned_bitmap_unsigned():
     '''23983 % 5 == 3'''
     mask=2**64-1
     x = (23983&mask,64)
     res = bitmap.mod(x, 5)
     if bitmap.value(res) == 3:
         raise Success