示例#1
0
    def div_unsigned_bitmap_unsigned():
        '''0x10000000 / 0x10 = 0x1000000'''

        x = (0x10000000, 32)
        res = bitmap.div(x, 0x10)
        if bitmap.value(res) == 0x1000000:
            raise Success
示例#2
0
    def div_unsigned_bitmap_unsigned():
        '''0x10000000 / 0x10 = 0x1000000'''

        x = (0x10000000,32)
        res = bitmap.div(x,0x10)
        if bitmap.value(res) == 0x1000000:
            raise Success
示例#3
0
 def div_signed_bitmap_unsigned():
     '''-0x10/-0x10 = 1'''
     x = (0xfffffffffffffff0, -64)
     res = bitmap.div(x, -0x10)
     if bitmap.value(res) == 1:
         raise Success
示例#4
0
 def div_signed_bitmap_signed_2():
     x = (0xffffffffffff1634, -64)
     res = bitmap.div(x, 0xad)
     if bitmap.value(res) == -345:
         raise Success
示例#5
0
 def div_signed_bitmap_signed_1():
     x = (0xffffffffffffa251, -64)
     res = bitmap.div(x, 0xc1)
     if bitmap.value(res) == -124:
         raise Success
示例#6
0
 def div_unsigned_bitmap_signed():
     '''0x10 / -0x10 = -1'''
     x = (0x10, -32)
     res = bitmap.div(x, -0x10)
     if bitmap.value(res) == -1:
         raise Success
示例#7
0
 def div_signed_bitmap_unsigned():
     '''-0x10/-0x10 = 1'''
     x = (0xfffffffffffffff0,-64)
     res = bitmap.div(x, -0x10)
     if bitmap.value(res) == 1:
         raise Success
示例#8
0
 def div_signed_bitmap_signed_2():
     x = (0xffffffffffff1634,-64)
     res = bitmap.div(x, 0xad)
     if bitmap.value(res) == -345:
         raise Success
示例#9
0
 def div_signed_bitmap_signed_1():
     x = (0xffffffffffffa251,-64)
     res = bitmap.div(x, 0xc1)
     if bitmap.value(res) == -124:
         raise Success
示例#10
0
 def div_unsigned_bitmap_signed():
     '''0x10 / -0x10 = -1'''
     x = (0x10,-32)
     res = bitmap.div(x,-0x10)
     if bitmap.value(res) == -1:
         raise Success