示例#1
0
 def test_get_max(self):
     arr = [1, 2, 3, 4, 5]
     arr2 = [1, -2, 5, 8, 4, 2]
     arr3 = []
     self.assertEqual(get_max(arr), 5)
     self.assertEqual(get_max(arr2), 8)
     self.assertEqual(get_max(arr3), None)
示例#2
0
 def test_get_max(self):
     arr = [1, 2, 3, 4, 5]
     list_1 = [17, 31, -4, 0, 20]
     list_2 = [-2, -5, -20, -10]
     self.assertEqual(get_max(list_1), 31)
     self.assertEqual(get_max(arr), 5)
     self.assertEqual(get_max(list_2), -2)
 def test_get_max(self):
     arr = [1, 2, 3, 4, 5]
     self.assertEqual(get_max(arr), 5)
     arr = [30, 29, 20, 10, 5, 2]
     self.assertEqual(get_max(arr), 30)
     arr = []
     self.assertEqual(get_max(arr), None)
示例#4
0
 def test_get_max(self):
     arr = [1, 2, 3, 4, 5]
     self.assertEqual(get_max(arr), 5)
     arr = []
     self.assertEqual(get_max(arr), None)
     arr = [1, 2, 4, 7, 3, 10, 9, 6]
     self.assertEqual(get_max(arr), 10)
     arr = [5]
     self.assertEqual(get_max(arr), 5)
示例#5
0
 def test_get_max_empty(self):
     arr = []
     self.assertEqual(get_max(arr), None)
示例#6
0
 def test_get_max(self):
     arr = [1, 2, 3, 4, 5]
     self.assertEqual(get_max(arr), 5)
示例#7
0
 def test_get_max(self):
     arr = [1, 2, 3, 4, 5]
     self.assertEqual(get_max(arr), 5)
     arr = [1, 1, 1, 0]
     self.assertEqual(get_max(arr), 1)
     self.assertEqual(get_max([]), None)