Пример #1
0
 def test_underflow(self):
     result = apply_operator(2**16, None, 'NOT')
     self.assertEqual(65535, result)
Пример #2
0
 def test_assign(self):
     result = apply_operator(256, None, 'ASSIGN')
     self.assertEqual(256, result)
Пример #3
0
 def test_and(self):
     result = apply_operator(1, 3, 'AND')
     self.assertEqual(1, result)
Пример #4
0
 def test_rshift(self):
     result = apply_operator(16, 4, 'RSHIFT')
     self.assertEqual(1, result)
Пример #5
0
 def test_or(self):
     result = apply_operator(1, 2, 'OR')
     self.assertEqual(3, result)