예제 #1
0
 def test_8byte_signed_decode(self):
     encoded = self._from_hex('D3EDEFABCD01234567')
     self.assertEqual(decode(encoded), -0xEDEFABCD01234567)
예제 #2
0
 def test_4byte_signed_decode(self):
     encoded = self._from_hex('D2EDEFABCD')
     self.assertEqual(decode(encoded), -0xEDEFABCD)
예제 #3
0
 def test_1byte_signed_decode(self):
     encoded = self._from_hex('D080')
     self.assertEqual(decode(encoded), -0x80)
예제 #4
0
 def test_2byte_signed_decode(self):
     encoded = self._from_hex('D1EDEF')
     self.assertEqual(decode(encoded), -0xEDEF)
예제 #5
0
 def test_small_signed_decode(self):
     encoded = self._from_hex('E4')
     self.assertEqual(decode(encoded), -4)