コード例 #1
0
ファイル: test.py プロジェクト: shz117/Leetcode
 def test_length1(self):
     A = [222]
     self.assertEqual(solution.jump(A), 0)
コード例 #2
0
ファイル: test.py プロジェクト: shz117/Leetcode
 def test_empty(self):
     A = []
     self.assertEqual(solution.jump(A), 0)
コード例 #3
0
ファイル: test.py プロジェクト: shz117/Leetcode
 def test_input_random(self):
     A = [7,0,9,6,9,6,1,7,9,0,1,2,9,0,3]
     self.assertEqual(solution.jump(A), 2)
コード例 #4
0
ファイル: test.py プロジェクト: shz117/Leetcode
 def test_input_impossible(self):
     A = [2,1,0,0,0,0,0,0,0,0,0,0]
     self.assertEqual(solution.jump(A), -1)
コード例 #5
0
ファイル: test.py プロジェクト: shz117/Leetcode
 def test_input_all_1(self):
     A = [1,1,1,1,1,1,1]
     self.assertEqual(solution.jump(A), 6)
コード例 #6
0
ファイル: test.py プロジェクト: shz117/Leetcode
 def test_input_2_1(self):
     A = [2,1]
     self.assertEqual(solution.jump(A), 1)