Beispiel #1
0
 def shrink_signed():
     x = (0xff, -8)
     res = bitmap.shrink(x, 4)
     if res == (15, -4) and bitmap.value(res) == -1:
         raise Success
Beispiel #2
0
 def shrink_unsigned():
     x = (0x50, 8)
     res = bitmap.shrink(x, 4)
     if res == (5, 4) and bitmap.value(res) == 5:
         raise Success
Beispiel #3
0
 def int(self):
     n = self.bitmap()
     # clamp to 30-bits...
     if n[1] > 30:
         n = bitmap.shrink(n, n[1] - 30)
     return n[0]
Beispiel #4
0
 def int(self):
     n = self.bitmap()
     # clamp to 30-bits...
     if n[1] > 30:
         n = bitmap.shrink(n, n[1] - 30)
     return n[0]
Beispiel #5
0
 def shrink_signed():
     x = (0xff, -8)
     res = bitmap.shrink(x, 4)
     if res == (15,-4) and bitmap.value(res) == -1:
         raise Success
Beispiel #6
0
 def shrink_unsigned():
     x = (0x50, 8)
     res = bitmap.shrink(x, 4)
     if res == (5,4) and bitmap.value(res) == 5:
         raise Success