Ejemplo n.º 1
0
 def test_reverse(self):
     x = 123
     result = reverse.Solution().reverse(x)
     expected_result = 321
     self.assertEqual(result, expected_result)
Ejemplo n.º 2
0
 def test_reverse(self):
     self.assertEqual(reverse.Solution().reverse(123), 321)
     self.assertEqual(reverse.Solution().reverse(-123), -321)
     self.assertEqual(reverse.Solution().reverse(120), 21)
Ejemplo n.º 3
0
 def test_result_not_thirty_two_bit_v2(self):
     x = 1563847412
     result = reverse.Solution().reverse(x)
     expected_result = 0
     self.assertEqual(result, expected_result)
Ejemplo n.º 4
0
 def test_result_not_thirty_two_bit(self):
     x = 1534236469
     result = reverse.Solution().reverse(x)
     expected_result = 0
     self.assertEqual(result, expected_result)
Ejemplo n.º 5
0
 def test_negative_with_zero(self):
     x = -120
     result = reverse.Solution().reverse(x)
     expected_result = -21
     self.assertEqual(result, expected_result)
Ejemplo n.º 6
0
 def test_negative(self):
     x = -123
     result = reverse.Solution().reverse(x)
     expected_result = -321
     self.assertEqual(result, expected_result)
Ejemplo n.º 7
0
 def test_negative_not_thirty_two_bit(self):
     x = -2**32
     result = reverse.Solution().reverse(x)
     expected_result = 0
     self.assertEqual(result, expected_result)