def test_underflow(self): result = apply_operator(2**16, None, 'NOT') self.assertEqual(65535, result)
def test_assign(self): result = apply_operator(256, None, 'ASSIGN') self.assertEqual(256, result)
def test_and(self): result = apply_operator(1, 3, 'AND') self.assertEqual(1, result)
def test_rshift(self): result = apply_operator(16, 4, 'RSHIFT') self.assertEqual(1, result)
def test_or(self): result = apply_operator(1, 2, 'OR') self.assertEqual(3, result)