def test_getMSB_greater(self): data = NumberMask(0xA, 4) msb = data.getMSB(6) self.assertEqual(msb, 0x28)
def test_getMSB(self): data = NumberMask(0xA, 4) msb = data.getMSB(2) self.assertEqual(msb, 2)
def test_getMSB_first(self): data = NumberMask(0xF, 1) msb = data.getMSB(1) self.assertEqual(msb, 1)
def test_getMSB_one(self): data = NumberMask(0x8, 4) msb = data.getMSB(1) self.assertEqual(msb, 1)
def test_getMSB_zero(self): data = NumberMask(0xA, 0) msb = data.getMSB(2) self.assertEqual(msb, 0)