示例#1
0
 def test2bytes(self):
     self.assertEqual(i2lsba(1, 2), [1, 0])
     self.assertEqual(i2lsba(0xff, 2), [0xff, 0])
     self.assertEqual(i2lsba(0x80, 2), [0x80, 0])
     self.assertEqual(i2lsba(0x100, 2), [0, 1])
     self.assertEqual(i2lsba(0xff00, 2), [0, 0xff])
     self.assertEqual(i2lsba(0x8000, 2), [0, 0x80])
 def test2bytes(self):
     self.assertEqual(i2lsba(1, 2), [1, 0])
     self.assertEqual(i2lsba(0xff, 2), [0xff, 0])
     self.assertEqual(i2lsba(0x80, 2), [0x80, 0])
     self.assertEqual(i2lsba(0x100, 2), [0, 1])
     self.assertEqual(i2lsba(0xff00, 2), [0, 0xff])
     self.assertEqual(i2lsba(0x8000, 2), [0, 0x80])
示例#3
0
 def test1byte(self):
     self.assertEqual(i2lsba(1, 1), [1])
     self.assertEqual(i2lsba(0xff, 1), [0xff])
     self.assertEqual(i2lsba(0x80, 1), [0x80])
示例#4
0
 def test0(self):
     self.assertEqual(i2lsba(0, 1), [0])
     self.assertEqual(i2lsba(0, 3), [0] * 3)
     self.assertEqual(i2lsba(0, 5), [0] * 5)
 def test1byte(self):
     self.assertEqual(i2lsba(1, 1), [1])
     self.assertEqual(i2lsba(0xff, 1), [0xff])
     self.assertEqual(i2lsba(0x80, 1), [0x80])
 def test0(self):
     self.assertEqual(i2lsba(0, 1), [0])
     self.assertEqual(i2lsba(0, 3), [0]*3)
     self.assertEqual(i2lsba(0, 5), [0]*5)